So, this fix comes from the WP Ecommerce forums, where people were having issues with the Dropshop module not showing on only the products page as they had chosen in “Shop Settings”. There is an option to show on every page, or to show only on the Products Page, and when “only on Products Page” was selected, it did not function correctly.
Keep in mind this fix is for WP Ecommerce versions 3.6.6 and earlier, as this issue will be fixed in later releases.
So, you will navigate to “wp-content/plugins/wp-shopping-cart/wp_shopping_cart.php”. On line 2256 you will see the following line:
1 | if(stristr(get_option('product_list_url'), ($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']))){ |
You will change that line to look like this:
if(stristr((‘http://’.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’]), get_option(‘product_list_url’))){
That’s it!
If you’re using the default page setup that WP Ecommerce sets up on installation, then you’re fine, but if not you will have a problem as this fix will not do anything for you. Upon installtion, WP ECommerce makes a page title “Products Page” and it will be a URL like this: www.yoursite.com/products-page
If you’re using that default setup for your products page, then you’re fine. If you have renamed that page or have made a new page for your products, then this fix will not help you, as it is telling Dropshop to show up on your default products page, which as far as it knows is “www.yourdomain.com/products-page” no matter what you have renamed it to.
So, for that issue, you can edit the “products_list_url” area of the above code to point to your new page or renamed page.
That’s it for now, so until next time…
Leave a Reply