Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-26-2003 20:32:57

jasonw22
Member
Registered: 11-26-2003
Posts: 8

Remove Quantity Field

How can I make it so that the quantity field is only shown on product pages when the maximum quantity for a product is greater than 1?

Offline

 

#2 12-01-2003 14:53:04

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19878
Website

Re: Remove Quantity Field

You can do that by first adding a new element under HTML Pages & Elements | Manage Site Elements.  Use the reference string 'ste_proddet_quanmax' and this HTML code:

Code:


Choose the appropriate quantity for this item below, then click the 'Add To Cart' button to add the item to your shopping cart.<BR><BR>

<FONT COLOR="(CGIVAR)html_notnull_font_color(/CGIVAR)"><B>(CGIVAR)html_notnull_character(/CGIVAR)</B></FONT> - Denotes a required field.<BR><BR>

<CENTER>

<TABLE WIDTH="(CGIVAR)html_content_table_size(/CGIVAR)" BORDER="0" CELLPADDING="10" CELLSPACING="3">

<TR BGCOLOR="(CGIVAR)html_pri_tablerow_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Quantity <FONT COLOR="(CGIVAR)html_notnull_font_color(/CGIVAR)"><B>(CGIVAR)html_notnull_character(/CGIVAR)</B></FONT></B><BR><BR></FONT>

<SELECT NAME="quantity">
<OPTION VALUE="1">1</OPTION>
</SELECT>
</TD>
</TR>

</TABLE>

</CENTER>

<BR>

Then in the file ./cgi-bin/library/modules/ste_prod.pl in the routine 'ste_prod_detail' change:

Code:


$column_line = "product_id,product_name,product_number,product_pricestatus,product_regprice,product_saleprice,product_volprice,product_voltext,product_recurprice,product_recurstatus,product_keywords,product_usecatdisc,product_useinv,product_inv,product_imgxlguse,product_imgxlg,product_imglg,product_imgsm,product_lgdisp,product_descshort,product_desclong,product_xopt";

To read:

Code:


$column_line = "product_id,product_name,product_number,product_pricestatus,product_regprice,product_saleprice,product_volprice,product_voltext,product_recurprice,product_recurstatus,product_keywords,product_usecatdisc,product_useinv,product_inv,product_imgxlguse,product_imgxlg,product_imglg,product_imgsm,product_lgdisp,product_descshort,product_desclong,product_xopt,product_usemax,product_max";

And change:

Code:


($product_id,$product_name,$product_number,$product_pricestatus,$product_regprice,$product_saleprice,$product_volprice,$product_voltext,$product_recurprice,$product_recurstatus,$product_keywords,$product_usecatdisc,$product_useinv,$product_inv,$product_imgxlguse,$product_imgxlg,$product_imglg,$product_imgsm,$product_lgdisp,$product_descshort,$product_desclong,$product_xopt) = @$row;

To read:

Code:


($product_id,$product_name,$product_number,$product_pricestatus,$product_regprice,$product_saleprice,$product_volprice,$product_voltext,$product_recurprice,$product_recurstatus,$product_keywords,$product_usecatdisc,$product_useinv,$product_inv,$product_imgxlguse,$product_imgxlg,$product_imglg,$product_imgsm,$product_lgdisp,$product_descshort,$product_desclong,$product_xopt,$product_usemax,$product_max) = @$row;

Then in the routine 'ste_prod_show_addtocart_detail' change:

Code:


&display_print('ste_proddet_quan');

To read:

Code:


if ($product_usemax eq "Y" && $product_max eq "1") {

&display_print('ste_proddet_quanmax');

} else {

&display_print('ste_proddet_quan');

} ######### End of if statement.


Nick Hendler

Offline

 

#3 08-11-2004 14:41:23

jclanin
Member
From: Atlanta, GA
Registered: 05-05-2004
Posts: 164
Website

Re: Remove Quantity Field

I'm trying to hide the quantity field and just have the add to cart button viewable when the user shops for "certain" products only.  All other products will need two show the quantity field. 

I can figure out how to hide it or show it all the time, but  how do I make it hidden (and default to 1) only on certain products?

thanks,

JC


Jim Clanin

Offline

 

#4 08-13-2004 16:06:53

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19878
Website

Re: Remove Quantity Field

Under HTML Pages & Elements | Manage Product Detail Displays, create a new element there that does what you want (I guess using a hidden quantity field).  Select that display type for any products you want to use it for (under Store Catalog | Manage Products).


Nick Hendler

Offline

 

#5 11-22-2004 11:52:46

rachaelr
Member
Registered: 11-12-2004
Posts: 31

Re: Remove Quantity Field

Did you get this working? It sounds like what I'm looking for!

cheers
Rachael

Offline

 

#6 11-24-2004 13:43:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19878
Website

Re: Remove Quantity Field

Yes.


Nick Hendler

Offline

 

Board footer