Forums / Templates, Stylesheets, Page Layout / How do you change add to cart?

How do you change add to cart?

Locked

Views: 6,378

Results 21 to 36 of 36
This thread is locked. New replies are disabled.
1 May 2008, 12:46 PM
#21
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

How do you change add to cart?

lkzone:

Hmm...I just tried those again -- one turns off the Qty box in the product listing but i cannot turn off the box on the main product info page.

Anyone know how to do this?

As Post #10 suggests, this is configured whilst adding the actual product to the store. So you'll need to go to Admin>Catalog>Categories/Products, locate the product and click to edit it, then change the field which says Products Quantity Box Shows.

1 May 2008, 1:33 PM
#22
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: How do you change add to cart?

Steven300:

As Post #10 suggests, this is configured whilst adding the actual product to the store. So you'll need to go to Admin>Catalog>Categories/Products, locate the product and click to edit it, then change the field which says Products Quantity Box Shows.

That's right. Or if you use easy populate you can set this as you upload them. That's how I did it.

1 May 2008, 1:46 PM
#23
lkzone avatar

lkzone

New Zenner

Join Date:
Jan 2008
Location:
Georgia
Posts:
68
Plugin Contributions:
0

Re: How do you change add to cart?

Okay -- thanks guys (girls?) -- It seems the Qty box is for each indivdual product so editing all my existing products would be quite time consuming. I may choose to keep the Qty box at this point.

That's right. Or if you use easy populate you can set this as you upload them. That's how I did it.

Kbmets7, what field did you update for this setting? Since I do use Easy Populate, maybe I can reload my products with only that field changed. (Can I update any fields I want using Easy Populate or just those shown in the "Full" Sample?)

Did anyone figure out how to get rid of the border around the Qty Box and Add to Cart graphic?

~Lynne

1 May 2008, 3:27 PM
#24
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: How do you change add to cart?

I'm pretty sure this is the one:

v_products_qty_box_status
set to 0

You can only update the fields in the full sample (I think)

Sorry, I can't be definitive. I'm learning here myself.

:unsure:

4 May 2008, 3:38 AM
#25
jaylyns avatar

jaylyns

New Zenner

Join Date:
Feb 2008
Posts:
61
Plugin Contributions:
0

Re: How do you change add to cart?

lkzone:

Okay -- thanks guys (girls?) -- It seems the Qty box is for each indivdual product so editing all my existing products would be quite time consuming. I may choose to keep the Qty box at this point.

Kbmets7, what field did you update for this setting? Since I do use Easy Populate, maybe I can reload my products with only that field changed. (Can I update any fields I want using Easy Populate or just those shown in the "Full" Sample?)

Did anyone figure out how to get rid of the border around the Qty Box and Add to Cart graphic?

~Lynne
To get rid of the border look for #cartadd in your css and you should see a line similar to Border: You can change it here or remark the line out to remove border completely.

www.jaylyns.com (Note: Contains Adult Products)

4 May 2008, 5:06 AM
#26
elastic avatar

elastic

New Zenner

Join Date:
Dec 2007
Location:
New Jersey
Posts:
76
Plugin Contributions:
0

Re: How do you change add to cart?

i have a question along the same lines, how can I keep the quantity box on the product listings page and have the add to cart next to each and every item in the product list?

literally, i need to do this:

product a [ 2 ] [add to cart button] product b [ 6 ] [add to cart button]

and so on.

hmmn. really?

5 May 2008, 2:40 AM
#27
elastic avatar

elastic

New Zenner

Join Date:
Dec 2007
Location:
New Jersey
Posts:
76
Plugin Contributions:
0

Re: How do you change add to cart?

just giving this a bump. is it even possible to have both the add to cart button and the entry field for number of products for every return in the product list?

hmmn. really?

7 May 2008, 11:46 PM
#28
elastic avatar

elastic

New Zenner

Join Date:
Dec 2007
Location:
New Jersey
Posts:
76
Plugin Contributions:
0

Re: How do you change add to cart?

i was able to get this to work, although I wish the layout could be changed a bit more. if anyone is interested, what I did was this:

. zen_image_submit(BUTTON_IMAGE_ADD_PRODUCTS_TO_CART, BUTTON_ADD_PRODUCTS_TO_CART_ALT, 'id="submit1" name="submit1"')

added this line of code so that button gets built as part of the $lc_text in the product_listings script, but, i wanted it outside the href. if you put it in the href tag it won't work, because it thinks its a link to the product info display page.

i thought i would post my solution in case anyone else has someone make this very odd request of them, putting a add to cart button next to each item in a product list...

:jump:

hmmn. really?

8 May 2008, 12:52 AM
#29
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do you change add to cart?

Admin > Configuration > Product Listing > Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product)

Set to 2.

You may also need to set the
Display Multiple Products Qty Box Status and Set Button Location
to 0.

8 May 2008, 1:54 AM
#30
fatguyinaz avatar

fatguyinaz

Zen Follower

Join Date:
Oct 2007
Location:
Safford, AZ
Posts:
313
Plugin Contributions:
0

Re: How do you change add to cart?

I just went through this entire process of removing the quantity box. I manually removed it from 2 of my test site products by doing:

Products Quantity Box Shows: No, Do not show Quantity Box
I also went into Admin->Configuration->Product Listing
Display Product Add to Cart Button
Display Multiple Products Qty Box Status and Set Button Location
I adjusted all the Product Listing settings to all possible choices, testing all settings. Bottom line is, if you do not have the Quantity Box showing for a product, you can't even adjust that product quantity in the Shopping Cart. If you try to make it simple for the buy so he/she clicks Add to Cart and it automatically just adds 1, then when going to the Shopping Cart it shows that 1 and there is no way to increase it to 2, other then going back to the product detail page and clicking Add to Cart again.

If I am wrong on this, please somebody correct me. Otherwise, it's necessary to keep the Quantity Box there for products you want customers to buy more then 1 of.

Steve
Zen cart version: 1.3.9h

8 May 2008, 12:49 PM
#31
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: How do you change add to cart?

kbmets7:

I have a similiar. question. I was able to get rid of the quantity box, however not the line that borders around the add to cart button:

So, how do I get rid of the border box, and another question:
how do increase the padding between the previous button and product image, so they aren't touching, as in the pic.

Does anyone know how to get rid of the border around the add to cart button?

Kevin
https://www.PosterExpo.com

8 May 2008, 1:57 PM
#32
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How do you change add to cart?

In stylesheet.css -

/Shopping Cart Display/
#cartAdd {
float: right;
text-align: center;
margin: 1em;
border: 1px solid #000000;
padding: 1em;
}

Change border to 0px or delete that line.

8 May 2008, 2:04 PM
#33
kbmets7 avatar

kbmets7

Zen Follower

Join Date:
Jan 2008
Posts:
89
Plugin Contributions:
0

Re: How do you change add to cart?

That did it. Thanks.

8 May 2008, 8:02 PM
#34
fatguyinaz avatar

fatguyinaz

Zen Follower

Join Date:
Oct 2007
Location:
Safford, AZ
Posts:
313
Plugin Contributions:
0

Re: How do you change add to cart?

Just a quick observation from a customers side ...

When the quantity box is removed and only the Add to Cart button is there, I would click it to add the product to my cart. Okay no problem. The confusion part comes in when viewing the Shopping Cart. I can see the product I added and the quantity of 1. Also, next to the quantity is a picture
(button_update_cart.gif).

When you put your mouse over the picture it says: "Change your quantity by highlighting the number in the box, correcting the quantity a..."

Well that can be very confusing and frustrating. If you decide you want more of that product then according to the instructions you just received by the mouse-over text on that update cart button, you can just highlight the quantity and change it ... but you can't. It's impossible to change the quantity from within the shopping cart once the Quantity Box has been removed. As a customer I would get really frustrated and possibly just leave.

Maybe some text in the shopping cart that says if you decide you want more of a particular item, click the item in the Shopping Cart to return to the item details page, then click Add to Cart again.

Ideally it would be nice to have the Quantity Box removed from the product listing page yet still have it in the Shopping Cart. Only way I can think of doing this is to manually edit the product listing page code and remove it there. Leave it enabled in the Admin area so it still shows on the Shopping Cart. If that was possible it would be nice.

Find a way to remove the button_update_cart.gif from the Shopping Cart if you don't have Quantity Boxes.

Just my observation and only written to give another perspective on this.

Steve
Zen cart version: 1.3.9h

18 Jun 2008, 3:43 AM
#35
picosan avatar

picosan

New Zenner

Join Date:
Nov 2005
Posts:
2
Plugin Contributions:
0

Re: How do you change add to cart?

Ideally it would be nice to have the Quantity Box removed from the product listing page yet still have it in the Shopping Cart. Only way I can think of doing this is to manually edit the product listing page code and remove it there.

Copy the file
includes/templates/template_default/templates/tpl_product_info_display.php
into your own template override directory and comment out the following 6 lines so that now it looks like this:
// if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
// } else {
// show the quantity box
// $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
// }

Leave the "product quantity box shows" as "yes" for those products.

Hope that helps.

http://www.wabisabibaby.com

24 Jun 2008, 7:46 AM
#36
fightthefourwalls avatar

fightthefourwalls

New Zenner

Join Date:
Nov 2007
Posts:
57
Plugin Contributions:
0

Re: How do you change add to cart?

I have an even simpler approach to this, basically create a template override file for tpl_product_info_display in "includes/templates/YOUR_TEMPLATE/templates/", then change this section:

// show the quantity box
    $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }

to

// show the quantity box
    $the_button = '<input type="hidden" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="1" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }

There you are! Nice and simple. Basically it just removes the text and the line breaks, and changes the quantity text input to hidden. This changes none of the functions and therefore will not cause any problems, just hides the display of some items.

Nick.