Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    help question Is it possible to add a product 'add to cart' on cart/checkout page? Please advise.

    My client has one item -- the proceeds of which go to support Breast Cancer. She would like that single item to be able to be added to the cart prior to check out.

    Is this possible? And if so, how?

    Alternately, I suppose I can edit the cart page to include a thumbnail image of the item, and a link back to its product page as a reminder. But ideally she would like it to be an automatic thing so they simply add it right then and there.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    One of my carts www.starless river.co.uk (with the space taken out) does this kind of thing with a copy of this months magazine that is offered as an extra on the shopping cart page.
    The code is added to tpl_shopping_cart_default and looks like:

    Code:
    <div id="whynot">
    <div id="descentimage"><?php  $descent_image=zen_get_products_image(107);echo $descent_image;?></div>
    <a href="http://www.starlessriver.com/shop/index.php?main_page=index&amp;action=buy_now&amp;products_id=107">
    <span class="cssButton " onmouseover="this.className='cssButtonHover'" onmouseout="this.className='cssButton'" >&nbsp;Yes Please&nbsp;</span></a>
    <h2 class="whynotheading">Why not add this month's magazine?</h2>
    <p><?php $descent = zen_get_products_description(107, 1);echo $descent; ?></p>
    </div>
    <br class="clearBoth" />
    Obviously there is some css styling that goes with that and you would want to change the '107' to the ID of your product. Oh, and I am using css buttons so if you are not then you might need to fiddle.....

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

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    Oh niccol you are wonderful!! THANK YOU very much ... that's perfect :)

  4. #4
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    One question - I copied the link for the add to cart button (with my product ID) but rather than add directly to the cart, as your's does, it goes to the product page. Is this because the product is set up with attributes (for quantities)?

  5. #5
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    Sorry, too late for me to edit previous post. The item IS being added to the cart -- however, it still bounces me to the product page anyway. Any idea how to stop that from happening? My code follows:

    PHP Code:
    <div><h2><em>Join the Fight!</em> October is Breast Cancer Awareness Month!</h2>Would you like to add our Ribbon of Hope cookies to your order?<br /></div>
    <div><img align="left" src="http://countrycookieconnection.com/store/images/cookies/Ribbon-of-Hope-2.jpg" style="margin:10px; width:125px;">
    <a href="http://countrycookieconnection.com/store/index.php?main_page=index&action=buy_now&products_id=49">
    <input type="image" src="includes/templates/theme183/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " style="margin:10px;" /></a>
    <p><?php $descent zen_get_products_description(491);echo $descent?></p>
    </div>
    <br class="clearBoth" />

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    Not sure, to be honest but you do have an input tag in there that is not needed. So, you end up with an input that is enclosed in a link which might produce strange results, particularly as the <input> isn't in a form.

    Code:
    <a href="http://countrycookieconnection.com/store/index.php?main_page=index&action=buy_now&products_id=49">
    <input type="image" src="includes/templates/theme183/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " style="margin:10px;" /></a>
    Which could be:

    Code:
    <a href="http://countrycookieconnection.com/store/index.php?main_page=index&action=buy_now&products_id=49">
    <img src="includes/templates/theme183/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " style="margin:10px;" /></a>
    Try that and see what occurs...

  7. #7
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    whoops, and thank you. Fixed that but still going to cart. And I removed the attributes from the product, that didn't change anything. Oh well ... I guess it's close enough, but your's is a much cleaner action.

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    Do you have a URL?

  9. #9
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis


  10. #10
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Is it possible to add a product 'add to cart' on cart/checkout page? Please advis

    Well, the action of ALL your add to cart buttons is to take the customer to the product info page rather than the shopping cart. This is set in the admin section.

    I'll have a look if I get a moment to see if there is an easy way to make just this button work in a different way.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 15 May 2013, 06:00 PM
  2. Add an add to cart button under each product quantity on the category page
    By buxton1 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Apr 2010, 06:37 PM
  3. Add to Cart & Checkout Buttons Direct to Blank Page. Help Please!
    By MehYourFace in forum General Questions
    Replies: 2
    Last Post: 17 Mar 2010, 01:24 AM
  4. Blank page when add to cart and checkout??! HELP PLEASE!
    By titantechs in forum General Questions
    Replies: 2
    Last Post: 31 Oct 2007, 06:01 PM
  5. Is it possible to add an images section to store without price/add to cart?
    By jdjohnson99 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Sep 2007, 04:37 AM

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