bobdonkey Posted May 20, 2016 Share Posted May 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 20, 2016 Share Posted May 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
bobdonkey Posted May 20, 2016 Author Share Posted May 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 20, 2016 Share Posted May 20, 2016 May I ask why you would not use the GoogleBase plugin? Quote Link to comment Share on other sites More sharing options...
bobdonkey Posted May 20, 2016 Author Share Posted May 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 20, 2016 Share Posted May 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
bobdonkey Posted May 21, 2016 Author Share Posted May 21, 2016 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 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 21, 2016 Share Posted May 21, 2016 Glad it's working for your needs! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.