Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    Jul 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    Thanks for your help Steve (nice to not have to call you Webbo1969).


    Shawn

  2. #12
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,410
    Plugin Contributions
    1

    Default Re: Add Product to Cart URL

    The same thing can be done with the Quick Order module as long as each of your items has a unique model #. See my page here for example:

    http://www.moissaniteco.com/loose_stones.html

    Once I installed that module, I just created a button and wrapped a link tag around it and changed the model number in the link for each item.

    You get the same result described in this thread, just a different approach.

  3. #13
    Join Date
    Jul 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    Where can you download the Quick Order module? I browsed through the downloads section, but didn't see it.

    Thanks!

  4. #14
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,410
    Plugin Contributions
    1

  5. #15
    Join Date
    Jul 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    Ok, so how do I install it? The readme said to upload it to your Zen Cart directory and that's it. That can't really be it, is it?

  6. #16
    Join Date
    Jul 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    Nevermind, my brain was on hiatus for a few minutes....

  7. #17
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    I've used Webbo's technique to put an Add to Cart for a hidden product on one of my index pages. It's working decently -- the product IS added to the cart, but then it's loading the product info page of the product.

    Is there a way to stop that? This product is supposed to be hidden so it's pretty awkward. I'd like it to just add the product to the cart and stay on the index page.

    Thanks for any help...
    Currently using ZEN CART v. 1.3.6

  8. #18
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Add Product to Cart URL

    What is your setting for Admin->Configuration->My Store->Display Cart After Adding Product?

    Display Cart After Adding Product
    Display the shopping cart after adding a product (or return back to their origin)
    - true
    - false
    If you set it to false, it will return to the page it came from, or the home page if the page is not a Zen Cart page ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #19
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default Re: Add Product to Cart URL

    It is set to false already.

    For the buy now buttons on the product listing and info pages, though, the product is added to the cart and it remains on that page. Why does it work differently on the index pages?

    Or, perhaps instead of using this <form> method, I thought I could try just taking the button from the product_listing page and manipulating it to my needs.

    Code:
    <?php echo '<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>'; ?>
    Since I'm only using this in one case, I thought I could just replace the $listing->fields['products_id']) with the actual product number. In this case, 5562.

    Code:
    <?php echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=5562">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; ?>
    But this is just generating an "unexpected ';' error". Not sure what I'm doing wrong here...
    Currently using ZEN CART v. 1.3.6

  10. #20
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Add Product to Cart URL

    webbo's method specified main_page=product_info ... which is why you're ending up there. change it to index if you wish to end up there instead.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Add product to Cart URL?
    By aire in forum General Questions
    Replies: 9
    Last Post: 16 May 2016, 09:41 PM
  2. Replies: 1
    Last Post: 14 Jan 2013, 03:43 AM
  3. Attribute add to cart url
    By Endre in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Oct 2009, 03:16 PM
  4. Add a return URL to add to cart
    By directpc in forum General Questions
    Replies: 9
    Last Post: 31 Oct 2007, 07:14 PM
  5. Products URL and Add to Cart
    By digidiva-kathy in forum General Questions
    Replies: 2
    Last Post: 18 Sep 2007, 02:50 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