Thanks for your help Steve (nice to not have to call you Webbo1969).
Shawn
Thanks for your help Steve (nice to not have to call you Webbo1969).
Shawn
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.
Where can you download the Quick Order module? I browsed through the downloads section, but didn't see it.
Thanks!
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?
Nevermind, my brain was on hiatus for a few minutes....
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
What is your setting for Admin->Configuration->My Store->Display Cart After Adding Product?
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 ...Display Cart After Adding Product
Display the shopping cart after adding a product (or return back to their origin)
- true
- false
.
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.
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.
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=' . $listing->fields['products_id']) . '">' . 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...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>'; ?>
Currently using ZEN CART v. 1.3.6
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.