Jump to content

[Resolved] Get product URL


bobdonkey

Recommended Posts

Hi

Does anyone know how to get the product URL? I am working on the database itself, so I need to be able to generate or get the product URL for any poduct in the inventory. This is so I can use it when exporting to google shopping.

Thanks

Link to comment
Share on other sites

Without looking in CubeCart, but staying only with looking at the database, the table CubeCart_seo_urls contain the core of product URLs.

For example, after a fresh install, the one test product could have, in that table's 'path' column, "test-category-01/test-product-1". This will be used to construct the full URL of:

www.example.com/store/test-category-01/test-product-1.html

There is an admin setting that causes CubeCart to prepend the category SEO name/path to the product SEO path. If this setting is to not do the prepend, then all that will be in the 'path' column is "test-product-1".

Another example:

"software/server/microsoft-server-2012" => www.example.com/software/server/microsoft-server-2012.html

Link to comment
Share on other sites

Thanks, that will do the job I think. For some reason phpmyadmin was not showing half of my tables, so I couldnt find that table when in fact it is there. Very odd.

So thanks again, this will allow me to create the URLs.

Cheers.

Link to comment
Share on other sites

Well that is a good question DB, I need to look at that more as it could save me some time.

But I want to be able to choose which products are exported as I don't want them all on google shopping. But maybe I could modify the google base plugin to suit my needs.

Thanks

Link to comment
Share on other sites

You may be able to narrow what is sent to shopping by using Google custom_labels. I use custom_label_0 for availability and have it set on Google to only pick up Adwords listings for in stock items. It could just as easily be for other criteria. I also use description_short on the estates site, instead of description.

Link to comment
Share on other sites

Yep all I did was modify the plugin so that it only exports products that have a google category set. So now when I set the category, it will automatically make it available on google shopping.

I just changed this line:

if($result['google_category'] != '')

 

Previously it was checked if the price was 0, but I dont care about that since I already have a script that checks for that.

Now I just need to make a script that will automatically set the google category for the product categories that I want to export. 

Thanks

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...