Thread: Buy Now Button

Results 1 to 10 of 27

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Location
    Hawaii
    Posts
    4
    Plugin Contributions
    0

    Default Re: Buy Now Button

    I followed all the directions above and the buy it now button still doesn't show
    Corri

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Buy Now Button

    wouldnt it have been just as easy to change the define for more info to a graphic?

    that way it would have acted like its supposed to and would have required about 30 seconds of changes that could go in the over rides file.

    just a thought for the future
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Feb 2008
    Posts
    61
    Plugin Contributions
    0

    Default "add to cart" button with "QTY" area

    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

  4. #4
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default 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):
    Code:
    $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:
    Code:
    $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:
    Code:
    $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

  5. #5
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default 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:
    Code:
    $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:
    Code:
    $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:
    Code:
    $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

  6. #6
    Join Date
    Jun 2004
    Posts
    135
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. v139h Changing BUY NOW button to SPONSOR NOW in one category
    By tomig in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 9 Sep 2015, 12:25 AM
  2. Change the Add to Cart button to Buy Now button
    By dastudio in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Nov 2010, 09:44 PM
  3. Adding a more info button alongside buy now button
    By jwburnside in forum General Questions
    Replies: 5
    Last Post: 6 Nov 2010, 01:36 PM
  4. How do I replace the Buy Now button with an Add to Cart button?
    By OrcaSoul in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 19 Feb 2010, 05:36 AM
  5. Buy Now Button
    By jwburnside in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 21 Jul 2009, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg