Forums / Customization from the Admin / Product Listing Page - Can I make the Buy Now Button Go to Product page?

Product Listing Page - Can I make the Buy Now Button Go to Product page?

Started by gtgderek on 8 Jun 2011, 3:07 PM · Views: 1,609

Results 1 to 5 of 5
8 Jun 2011, 3:07 PM
#1
gtgderek avatar

gtgderek

New Zenner

Join Date:
Mar 2009
Posts:
36
Plugin Contributions:
0

Product Listing Page - Can I make the Buy Now Button Go to Product page?

When I view all products in a category, if the product has attributes and you click more info, you will go to the Product info page. But if there is no attributes and you click buy now, it will add the product to the cart.

I would prefer to set my website to ALWAYS take the customer to the product info page, not to just add the product to the cart.

How can I change this setting? (btw, I have changed all more info wording into Click Here)

The main page in question is my Artists collection page, which you can view by following this link -

8 Jun 2011, 3:17 PM
#2
gtgderek avatar

gtgderek

New Zenner

Join Date:
Mar 2009
Posts:
36
Plugin Contributions:
0

Re: Product Listing Page - Can I make the Buy Now Button Go to Product page?

Update I fixed the problem, not sure if this is how I was suppose to fix it, but it works.

Here is what I did for future users with the same issue.

I fixed the issue by editing the product_listing.php file located in includes/modules/my_templates_name/ directory.

At line 149 I change this coding -

$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br><br><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, 'class="listingBuyNowButton"') . '</a>';

To this -

$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br><br><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';

And now zencart works the way I wanted it to work.

11 Jun 2011, 11:05 PM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Product Listing Page - Can I make the Buy Now Button Go to Product page?

The only problem with that is that you are likely to annoy your customers who actually expect the buy Now button to do just that, not take them to another page.

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

11 Jun 2011, 11:37 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,758
Plugin Contributions:
56

Re: Product Listing Page - Can I make the Buy Now Button Go to Product page?

I agree with Ryk - possibly mitigate this by using the "More Info" button instead?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jun 2011, 1:16 AM
#5
gtgderek avatar

gtgderek

New Zenner

Join Date:
Mar 2009
Posts:
36
Plugin Contributions:
0

Re: Product Listing Page - Can I make the Buy Now Button Go to Product page?

That's why I labeled the button Click Here, instead of buy now. Already thought of that and my sales have increased by making that change.