Buy Now Button

Locked

Views: 42,873

Results 21 to 27 of 27
This thread is locked. New replies are disabled.
12 Mar 2008, 9:50 PM
#21
mrcoolboy15 avatar

mrcoolboy15

New Zenner

Join Date:
Feb 2008
Posts:
61
Plugin Contributions:
0

Buy Now Button

Along with this info i have learned with this thread is there a way to add a QTY entry box below the "add to cart" button??

thanks

31 Mar 2008, 5:06 PM
#22
bogie avatar

bogie

Zen Follower

Join Date:
Feb 2008
Posts:
132
Plugin Contributions:
0

Re: Buy Now Button

Maybe I'm not sufficiently caffeinated here...

I'd like to have a "buy it now/add to cart" button with EVERY product on the listings... I'm still modding the classic template. Right now, the customer can type numbers in the little boxes, and hit add to cart all at once - I'd rather 'em just have to hit one box per item - and if they want multiples, then they can think about it.

Any ideas?

3 May 2008, 1:20 PM
#23
tinadad avatar

tinadad

New Zenner

Join Date:
Apr 2008
Posts:
39
Plugin Contributions:
0

Re: Buy Now Button

Well I am confused , was planning to get the cart live on the first but the learning curve for this old fella is a real struggle. Is there any possible way to have on the main page under the item a DETAIL | BUY NOW link. I am trying to rebuild a cart that was written in another package and it had those links. Is it possible to do this in Zen Cart???

9 Jun 2008, 6:47 PM
#24
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

Re: Buy Now Button

Hi

I made changes in English.php and worked fine until I noticed when I click ALL PRODUCTS or NEW PRODUCTS, I see BUY NOW buttons underneath the product image and at the end of description if the description is added. I tried looking into tpl_product_info_display.php but cant find a define statement. I want to do the following:

Display "Buy Now" button instead of MORE INFO on products with attributes and otherwise but dont want it to display TWICE if I change the define statement to call the button in english.php

4 Aug 2008, 9:21 PM
#25
prosam avatar

prosam

Zen Follower

Join Date:
Jun 2004
Posts:
118
Plugin Contributions:
0

Re: Buy Now Button

I did a search for this a few weeks ago and I could not find it. Now I'm looking for something else and I find it anyways...

I was looking for something similar. I wanted to have BOTH the Buy Now and More Info link and I did it by modifying the modules/MY_TEMPLATE/product_listing.php file. I only have one attribute on all the products and it's optional so no need for the client to have to see the individual product page.

For those still looking to be able to do this:
Make a copy of includes/modules/product_listing.php and place it in includes/modules/YOUR_TEMPLATE/product_listing.php

Find (Line 115):

$lc_button = '<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

Replace with:

$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, 'class="listingBuyNowButton"') . '</a><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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

Do the same with Line 133:

$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, 'class="listingBuyNowButton"') . '</a>';

Replace with the same code in the middle.

This is what mines look like
Products with Atts: connecticutvalleybiological.com/advanced-placement-biology-advanced-placement-by-neosci-c-65_75.html

Without Atts: connecticutvalleybiological.com/test-cat-test-subcat-c-67_68.html

4 Aug 2008, 9:32 PM
#26
prosam avatar

prosam

Zen Follower

Join Date:
Jun 2004
Posts:
118
Plugin Contributions:
0

Re: Buy Now Button

NOTE: I tried to edit the above post within the 7 minutes but I could not get it in. Seems I should've tested the results before posting that I figured it out :(

This is what that post should say:

I did a search for this a few weeks ago and I could not find it. Now I'm looking for something else and I find it anyways...

I was looking for something similar. I wanted to have BOTH the Buy Now and More Info link and I did it by modifying the modules/MY_TEMPLATE/product_listing.php file.

I only have one attribute on all the products and it's optional so no need for the client to have to see the individual product page.

So far it only works on the no attributes items. On the page with items with attributes you can see the buy now button but it takes you to the product page instead of adding the item to the cart.

Can somebody take a look at my edits and let me know where I went wrong?

This is what I did:
Placed a copy of includes/modules/product_listing.php in includes/modules/MY_TEMPLATE/product_listing.php

Line 115:

$lc_button = '<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

Replaced with:

$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, 'class="listingBuyNowButton"') . '</a><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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';

Line 133:

$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, 'class="listingBuyNowButton"') . '</a>';

Replaced that also with the code in the middle

This is what mines look like
Products with Atts: connecticutvalleybiological.com/advanced-placement-biology-advanced-placement-by-neosci-c-65_75.html (Buy Now Does Not Work Correctly)

Without Atts: connecticutvalleybiological.com/test-cat-test-subcat-c-67_68.html

5 Aug 2008, 4:05 PM
#27
prosam avatar

prosam

Zen Follower

Join Date:
Jun 2004
Posts:
118
Plugin Contributions:
0

Re: Buy Now Button

Well it turns out the client does want the option of read more when there's an attribute so I had to mix up the stuff.

I still have the Add to Cart and More Info link on items without attributes but now items with atts get a button that says More Info instead of a link. THe links above will represent the final version.

IN order to keep a text link and image link for more info I copied the MORE_INFO_TEXT definition and named it MORE_INFO_TEXT2. Now one is the image version and the other is the text version. Then referenced that accordingly in product_listing.php.