Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add To Cart/Quantity Box on main page?

Add To Cart/Quantity Box on main page?

Locked

Views: 2,597

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
22 Jun 2009, 11:04 PM
#1
andrew55 avatar

andrew55

New Zenner

Join Date:
Jun 2009
Posts:
43
Plugin Contributions:
0

Add To Cart/Quantity Box on main page?

I've been searching but surprisingly can't seem to get anywhere with this. I'd like to get "quantity box" in the "Featured Products" of the front page of my site (for entering the desired amount of products). I would also need a "add to cart" button and I would like a "more details" button too. I can't find an addin or code snippet anywhere to make this happen.

Any suggestion on how to do this? Is this even possible with Zen Cart?

I recently migrated over from oscommerce. If an "add to cart" button was on a page in oscommerce (for example, on the home page in the featured products section) this code would insert a quantity field:

$button = '<form name="cart_add" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=update_product&products_id=' . $products['products_id'] , 'NONSSL'). '"><input type="hidden" name="products_id" value="' . $products['products_id'] . '"><input type="text" name="cart_quantity" value="1" maxlength="5" size="5"><br>' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</form>'; 

Anything like this available for Zen Cart? Thanks for any suggestions.

23 Jun 2009, 12:54 AM
#2
stiggy100 avatar

stiggy100

Zen Follower

Join Date:
Jan 2009
Posts:
298
Plugin Contributions:
0

Re: Add To Cart/Quantity Box on main page?

Im sure you have probably already done this, but have you played around with the admin:

admin>configuration>featured listing

Seems to have a buy now option and more information etc etc

23 Jun 2009, 3:28 AM
#3
andrew55 avatar

andrew55

New Zenner

Join Date:
Jun 2009
Posts:
43
Plugin Contributions:
0

Re: Add To Cart/Quantity Box on main page?

Yikes - sorry I missed that one - that was confusion on my part. Still new and learning.

But I saw the "buy now" button setting in

admin>configuration>featured listing

The ""Display Product Buy Now Button" is set to 2051

I can see the featured products box centered on my home page with products in it., but there are no "buy now" buttons showing (actual buttons which say buy now or add to cart). Anybody have any ideas what I am missing here?

I've been reading and rereading the manual, and the settings seem to make sense, but I can't seem to get the "buy now" button to show on the home page in featured product.

I even did a quick new Zen Cart install on a different directory in my site (I have bluehost and it can be quickly done from cpanel). On the new install, the buy now buttons aren't showing either. Any ideas? Thanks for any suggestions.

23 Jun 2009, 5:32 AM
#4
andrew55 avatar

andrew55

New Zenner

Join Date:
Jun 2009
Posts:
43
Plugin Contributions:
0

Re: Add To Cart/Quantity Box on main page?

Here's the issue - I finally found this after searching:
http://www.zen-cart.com/forum/showthread.php?t=43404

I guess this still stands with the current version of Zen Cart.

I'm not much of a coder, but I am going to attempt to edit my template files. If would be great to see this as an addin - (buy now, more info, quantity field on Product Features center box on homepage). If anyone has any more knowledge of this, please share any insights. I think many store owners would benefit.

16 Dec 2010, 10:53 AM
#5
zillionzillion avatar

zillionzillion

New Zenner

Join Date:
Dec 2010
Posts:
4
Plugin Contributions:
0

Re: Add To Cart/Quantity Box on main page?

I am using 1.3.9h.

I am trying to add an add to cart box/button on every featured product on the main page.

I tried to add

$add_code .='. <a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">' . '<img src="my image link" />' . '</a>';

It doesn't work.

How can I add an add to cart box/button on every featured product on the main page?

Please help.