Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to disable the minimum value on my product list?

How to disable the minimum value on my product list?

Locked

Views: 1,139

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
6 Jan 2010, 10:52 AM
#1
hegees avatar

hegees

New Zenner

Join Date:
Jan 2010
Posts:
17
Plugin Contributions:
0

How to disable the minimum value on my product list?

I have changed the settings of my "minimum values" and "units" for some of my products in order to allow fractional product amount, but after I did, they both show up in my product list under each product. I don't want them there, so what do I do to get rid of them?

6 Jan 2010, 4:10 PM
#2
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

Join Date:
Jun 2006
Posts:
123
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

When you set a minimum quantity, shouldn't the customer see this before trying to add to cart? (assuming they can add to cart from the product listing)

Anyway, if you do want to remove it, you'll need to edit /includes/modules/[YOUR_TEMPLATE]/product_listing.php.
(you'll need some idea of what you're doing with php - I don't know what template/add-ons you are using so I cannot be precise)

The function which displays the min/units quantities is zen_get_products_quantity_min_units_display.
So search for it, see where this function is called and take it out.
Always backup the original file, of course, so you can experiment freely.

(Disclaimer - I'm pretty sure there is no admin setting for this... if I'm wrong, this is just the "hard way" to do it)

6 Jan 2010, 10:05 PM
#3
hegees avatar

hegees

New Zenner

Join Date:
Jan 2010
Posts:
17
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

Ok, thank you!

It's in the description of the product (fabrics) that it is sold by the yards, and that the smallest amount to put in the cart is 0.5, so I don't need it anywhere else... And when the unit part is there as well, it looks like the price is per half the yard, and that can be a bit confusing.

Anyways, thanks for helping, I'll try to figure out what to delete from the mentioned php.file.

6 Jan 2010, 10:53 PM
#4
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

Join Date:
Jun 2006
Posts:
123
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

You're welcome.

If you're still having trouble, you could paste the specific line(s) here (containing the above mentioned function) and I'll try helping out

20 Jan 2010, 9:15 PM
#5
hegees avatar

hegees

New Zenner

Join Date:
Jan 2010
Posts:
17
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

Hi again!

Php is not what I am best at, so I still can't get it out of there. I tried to delete something in the product_listing.php, but then some strange numbers showed up instead...

What exactly do I have to delete (from where to where)?

$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') :

Thanks again for helping!!!
Hege

20 Jan 2010, 11:08 PM
#6
bodyjewelrystores avatar

bodyjewelrystores

Zen Follower

Join Date:
Jun 2006
Posts:
123
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

Hey,

The is is the line you should edit. In the below example, instead of deleting, I wrapped it with comment tags (/* like so */), so just insert those tags at exactly the same places (before the dot, and before the final semicolon) and it should work fine.

$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) / . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']) / ;

21 Jan 2010, 11:45 AM
#7
hegees avatar

hegees

New Zenner

Join Date:
Jan 2010
Posts:
17
Plugin Contributions:
0

Re: How to disable the minimum value on my product list?

Thank you so much for helping me out! I'll try to edit the line when I get out of work!