Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Is it possible to force Quantity Box on Product Listing with Attributes

Is it possible to force Quantity Box on Product Listing with Attributes

Locked

Views: 2,842

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
23 Apr 2009, 5:05 PM
#1
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Is it possible to force Quantity Box on Product Listing with Attributes

I have an optional check box attribute on my products, and thus it's not necessary to actually visit the product page to add the product to the cart. Is there an override to force the products to display the quantity box instead of the '...more info' link?

23 Apr 2009, 5:59 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Is it possible to force Quantity Box on Product Listing with Attributes

I have an optional check box attribute on my products, and thus it's not necessary to actually visit the product page to add the product to the cart. Is there an override to force the products to display the quantity box instead of the '...more info' link?
Then customer will not/can not select from the options???

23 Apr 2009, 6:32 PM
#3
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

That doesn't really help me. I was asking how it can be done, not whether.

23 Apr 2009, 8:58 PM
#4
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

In other words, the attribute is optional, as I stated in my original post. I don't care if they select it or not.

23 Apr 2009, 8:59 PM
#5
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Is it possible to force Quantity Box on Product Listing with Attributes

NO this is not an option......

and if you dont care if its checked why bother having it there........

also just to let you know being rude normally will not get you any help around here......

23 Apr 2009, 9:19 PM
#6
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

I apologize if you thought I was being rude. I thought Kobra's reply was unnecessary because it didn't address my question and I said so. I didn't call him names or anything.

What I want to do with my cart is my business. I was merely asking if it was possible to do what I wanted and if so, how. I don't need to be questioned on my motivation for wanting to do it. If a reply doesn't answer the question asked there's no need for a reply, imho.

I know it's not possible to do it through the configuration. But I have a feeling it's possible by overriding some code (which I also said in my original post). I'd like to know if anyone knows where that code could be. That would answer my question and be very helpful to me.

Thanks in advance.

23 Apr 2009, 11:59 PM
#7
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Is it possible to force Quantity Box on Product Listing with Attributes

your right it is your business,

I was just curious,

It just didnt make any sense to me to have an attribute there that you dont require for the order...

best of luk

24 Apr 2009, 1:23 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Is it possible to force Quantity Box on Product Listing with Attributes

Your original Post Question

lancemonotone:

Is there an override to force the products to display the quantity box instead of the '...more info' link?
I read this as an admin setting - which there is none and for the reason I stated - - maybe I should have elaborated:
In the product listing any item with attributes automatically gets the "more" displayed so that the customer will be able to select from the options
So if you want a different display for this single item you will require a bit of crafty 'if" code to check for this product.
For a global change you need to look at and follow the product listing code and make the necessary changes

24 Apr 2009, 1:24 AM
#9
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

I maybe should have just asked where the code that controls the Quantity Box display on the Product List page is.

24 Apr 2009, 1:26 AM
#10
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

Our posts overlapped but that's what I was just thinking, Kobra. Do you happen to know which file controls the product listing?

24 Apr 2009, 1:36 AM
#12
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

Yes! Thank you...that is great: includes/modules/product_listing.php. The developer tool kit is a pretty handy thing to have. Thanks for pointing me to it.

24 Apr 2009, 1:56 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Is it possible to force Quantity Box on Product Listing with Attributes

The developer tool kit is a pretty handy thing to have.
Old fashioned "grep" in Zen clothing

27 Apr 2009, 5:59 PM
#14
lancemonotone avatar

lancemonotone

New Zenner

Join Date:
Oct 2008
Posts:
11
Plugin Contributions:
0

Re: Is it possible to force Quantity Box on Product Listing with Attributes

For anybody crazy enough to want to display the Quantity Box for products with attributes on the Product Listing page:

  1. Create an array in your main language file called $SHOW_QTY_BOX_CATEGORIES and populate it with the category ids for which you want to display a Quantity Box. Example: ```php
    $SHOW_QTY_BOX_CATEGORIES = array(1,7);
2. Go to (or copy/create) includes/modules/[TEMPLATE]/product_listing.php
3. Search for this line: ```php
if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
  1. Change it to this: ```php
    if ((zen_has_product_attributes($listing->fields['products_id']) and (isset($SHOW_QTY_BOX_CATEGORIES) and !in_array(zen_get_products_category_id($listing->fields['products_id']), $SHOW_QTY_BOX_CATEGORIES))) or PRODUCT_LIST_PRICE_BUY_NOW == '0' ) {
24 Jun 2009, 11:11 PM
#15
godling avatar

godling

New Zenner

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

Re: Is it possible to force Quantity Box on Product Listing with Attributes

Thank you for posting your solution lancemonotone, it's exactly what I was looking for and I didn't have to read through a dozen threads trying to find it