Forums / Templates, Stylesheets, Page Layout / Remove buy now button/more info and max:1

Remove buy now button/more info and max:1

Locked

Started by julieoolie on 4 Feb 2008, 8:17 AM · Views: 8,847

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
4 Feb 2008, 8:17 AM
#1
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Remove buy now button/more info and max:1

I want to remove the buy now button/more info and max:1 from my product listing pages.

http://gleefulthings.com/shop/index.php?main_page=index&cPath=2_3

I figured out how to turn off the buy now button. But then ...more info pops up in it's place and I don't want that either. I went to the english.php file and removed it. But that just left me with a blank line there that I don't want. I put everything back to how it was with the buy now button. But I'd like to know if there's a way to get rid of that and the max:1 thing without leaving big gaps (blank lines) where they used to be? And is there a way to move the price up so that there's no blank line between it and the product name?

4 Feb 2008, 8:56 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Remove buy now button/more info and max:1

You can close up the elements by adding this to your stylesheet> #productListing br {line-height:0}but to get rid of all traces of the button/more info and max:1 would require programming changes to the product_listing.php module.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

4 Feb 2008, 9:15 AM
#3
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

Thanks! That fixed the spacing. :smile:

I'm looking at product_listing.php but I'm not really sure what to change.

4 Feb 2008, 9:19 AM
#4
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I think I can live with the buy now button but I really do want to get rid of the max:1. I noticed that it appears in the shopping cart as well. Is there a way to turn that off throughout the site?

4 Feb 2008, 10:16 AM
#5
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

Looks like you've found the answer to the max:1 Did you edit the product_listing.php?

4 Feb 2008, 6:51 PM
#6
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

no, I just removed the max quantity from all my products. I didn't know what to edit in the php.

4 Feb 2008, 8:01 PM
#7
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I had to put the max quantity back to 1 because I need it like that. I also added attributes to my products so now it's taken the buy now buttons away and says ... more info again. Does anyone know what I would edit to get rid of these?

13 Feb 2008, 2:40 PM
#8
stuville avatar

stuville

New Zenner

Join Date:
Feb 2008
Location:
St. Louis, MO
Posts:
1
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I too had the "Max:1" issue. I edited the product_listing.php.

  1. Copy the product_listing.php to /include/modules/YOUR_TEMPLATE/. before you edit.
  2. Search for zen_get_products_quantity_min_units_display
  3. You will need to delete the above searched text and add a semicolon. In my products_listing.php file, I found it on line 148.

original code:
$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']);

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

At least this worked for me.

26 May 2009, 3:52 AM
#9
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

stuville:

I too had the "Max:1" issue. I edited the product_listing.php.

  1. Copy the product_listing.php to /include/modules/YOUR_TEMPLATE/. before you edit.
  2. Search for zen_get_products_quantity_min_units_display
  3. You will need to delete the above searched text and add a semicolon. In my products_listing.php file, I found it on line 148.

original code:
$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']);

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

At least this worked for me.

Worked great for me, too. Thanks stuville.

21 Dec 2009, 2:47 AM
#10
mgoitein avatar

mgoitein

New Zenner

Join Date:
Dec 2009
Posts:
2
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I'm using 1.3.8a + all recent patches.

I was trying to get rid of the Max: 1 in the product listing page.

I tried the solution mentioned here by stuville, and it caused my entire product listing page to appear blank.

Somehow, for my needs, I had to debug the code, and finally ended up with a blank statement instead of the products ID;

In other words, in my product_listing.php, on line 189:

$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']);

had to become

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

I had a heck of a time finding any info on the Max: 1, and how to excise ("exorcise"?) it. Does not seem to be the most useful of data field tags in the system...

Hope this helps someone else.

5 Aug 2010, 2:30 PM
#11
eddyboy avatar

eddyboy

New Zenner

Join Date:
Nov 2008
Posts:
18
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I'm in the same boat, I have only one of a kind hand made items for sale, so i want to get rid of the "Max:1" text.
I've used the code below to remove it from the product_listing.php page but it still shows Max: 1 on two other pages /index.php?main_page=products_all and /index.php?main_page=products_new

Anything ive tried just breaks the pages :unsure:

Thanks in advance

2 Oct 2010, 4:52 PM
#12
524cw avatar

524cw

New Zenner

Join Date:
Sep 2008
Posts:
53
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

eddyboy:

I'm in the same boat, I have only one of a kind hand made items for sale, so i want to get rid of the "Max:1" text.
I've used the code below to remove it from the product_listing.php page but it still shows Max: 1 on two other pages /index.php?main_page=products_all and /index.php?main_page=products_new

Anything ive tried just breaks the pages :unsure:

Thanks in advance

What I did was search the Zencart folder for the term

zen_get_products_quantity_min_units_display

Thats what triggers the max1 thing. I just removed the break tag, and then the statements involving the max1 from

tpl_modules_new_produdcts_new_listing.php
tpl_modules_new_produdcts_featured_listing.php

in the templates_default/templates folder.

19 Oct 2010, 6:01 PM
#13
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

I got rid of 'max: 1' -- w/o hacking any core files -- by using the following settings when listing products. There will be one product for sale, but 'max: 1' will not appear on product listings or on product info pages.

  • No, Do not show Quantity Box

Product Qty Minimum: 1
Product Qty Maximum: 0 (or blank)
Product Qty Units: 1

Products Quantity: 1

25 Oct 2010, 11:21 PM
#14
cydgeno avatar

cydgeno

New Zenner

Join Date:
May 2009
Posts:
5
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

thank you very much, finlander :clap::bigups: this vicious stuff was getting on my nerves .

25 Oct 2010, 11:34 PM
#15
finlander avatar

finlander

Zen Follower

Join Date:
Oct 2010
Location:
Idaho
Posts:
293
Plugin Contributions:
0

Re: Remove buy now button/more info and max:1

Glad it helped, but I need to update my earlier response. I had to stop using my own advice because it caused a different problem.

Yes, you can make it not show by setting Max Qty (which means Max Qty purchasable) to 0 or blank when you list or edit the Product's details, but then, a shopper can add the same item to the cart repeatedly, and get error or warning message repeatedly after the product is added once to the cart. Zen Cart is built that way by design -- you may allow people to put an item in the cart 5 times even though you only have one of the product for sale, because you might be willing accept payment for the other 4 items also, and then deliver those items to the buyer at a later time. There is a setting in Admin for which type of behavior Zen Cart will perform in this situation -- either tell the buyer about out-of-stock items being put on back order, or not allowing the buyer to checkout until the cart only contains in-stock items.

Anyway, I didn't want buyers to get a confusing error/warning message if they tried to Add the item more than once, so I put Max 1 back on my items. I do want to try hacking some code to remove it, though, as discussed earlier in this thread.

Jim