Show Dropshop on only Products Page

Mon, Jun 16, 2008

WPSC Tips and Tricks

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:

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…

Related Posts

, , ,

This post was written by:

admin - who has written 10 posts on S-Tastic Designs - Web Designer for Hire.


Contact the author

Do you have a Gravatar yet? It's that cool icon next to your name. All you have to is click here to upload your own Gravatar for free. If you do, you'll see it by every comment you post on S-Tastic Designs and every other blog that supports Gravatars!

0 Comments For This Post

1 Trackbacks For This Post

  1. ShushiLov3r’ DropShop » Blog Archive » Hello world! Says:

    [...] Welcome to my DropShop. This is my first post here [...]

What Do You Think?