Forums / All Other Contributions/Addons / BUG/Error: Ultimate SEO URLs and ZenCart 1.2.6

BUG/Error: Ultimate SEO URLs and ZenCart 1.2.6

Locked

Started by ronpeled on 11 May 2006, 10:51 PM · Views: 2,674

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
11 May 2006, 10:51 PM
#1
ronpeled avatar

ronpeled

Zen Follower

Join Date:
Sep 2004
Location:
LA, California
Posts:
111
Plugin Contributions:
0

BUG/Error: Ultimate SEO URLs and ZenCart 1.2.6

A client of mine discovered a bug in ZenCart 1.2.6 with the contribution Ultimate SEO URLs installed. The bug happens when you select a manufacturer from the drop down of manufacturers (a sidebox) - this redirects you to the product listing for this manufacturer.

Now, if you setup your cart to show the 'Add to Cart' button without any extra fields on the product listing page than clicking on it will not add the product to your cart, but instead will redirect you to the home page.

Yes, annoying and frustrating. To fix the issue open the file /includes/modules/product_listing.php on line 130:
Change from:

$lc_button = '<a href="' . zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';

To:

$lc_button = '<a href="' . zen_href_link(FILENAME_DEFAULT,  'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';

Enjoy!
Ron Peled

Ron Peled

22 May 2006, 10:23 PM
#2
bigappledirect avatar

bigappledirect

New Zenner

Join Date:
Apr 2006
Posts:
5
Plugin Contributions:
0

Re: BUG/Error: Ultimate SEO URLs and ZenCart 1.2.6

Same Problem with 1.2.7d on line 139 change:

From:

$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';

To:

$lc_button = '<a href="' . zen_href_link($_GET['main_page'], 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';

Best Regards

Ruslan