Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

default to available

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-02-2007, 10:50 AM
 
concepts concepts is offline
 

Senior Member
  
Join Date: Nov 2003
Posts: 104
 

Default default to available

When ADDING A NEW PRODUCT (add / modify product), I am trying to change the code so it will default to

AVAILABLE.

I tried <option value="Y"{if $product.forsale eq "Y" or EQ ""} but it doesnt work




{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[forsale]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$lng.lbl_availability}:</td>
<td class="ProductDetails">

<select name="forsale">

<option value="Y"{if $product.forsale eq "Y"} selected="selected"{/if}>{$lng.lbl_avail_for_sale}</option>
<option value="H"{if $product.forsale eq "H"} selected="selected"{/if}>{$lng.lbl_hidden}</option>
<option value="N"{if $product.forsale ne "Y" && $product.forsale ne "H" && ($product.forsale ne "B" || not $active_modules.Product_Configurator)} selected="selected"{/if}>{$lng.lbl_disabled}</option>
{if $active_modules.Product_Configurator}
<option value="B"{if $product.forsale eq "B"} selected="selected"{/if}>{$lng.lbl_bundled}</option>
{/if}
</select>
</td>
</tr>
__________________
4.1.8
Xcart
Reply With Quote
  #2  
Old 09-02-2007, 11:12 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: default to available

I haven't really looked for this, but I agree with you. This should be defaulted to Available.

Have you checked out product_details.tpl?
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #3  
Old 09-02-2007, 08:21 PM
 
Victoria Feemster Victoria Feemster is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 45
 

Default Re: default to available

I would like to know where to edit this also.
__________________
Thank you,
Victoria Feemster
x-cart pro - 4.1.8
Reply With Quote
  #4  
Old 09-03-2007, 04:37 AM
 
concepts concepts is offline
 

Senior Member
  
Join Date: Nov 2003
Posts: 104
 

Default Re: default to available

This is what I came up with, I havent adjusted for product configurator, so if you use that, dont change the code. Use at your own risk and make backups





<select name="forsale">

<option value="Y"{if $product.forsale ne "N" && $product.forsale ne "H" && $product.forsale ne "B" } selected="selected"{/if}>{$lng.lbl_avail_for_sale}</option>
<option value="H"{if $product.forsale eq "H"} selected="selected"{/if}>{$lng.lbl_hidden}</option>
<option value="N"{if $product.forsale eq "N"} selected="selected"{/if}>{$lng.lbl_disabled}</option>
{if $active_modules.Product_Configurator}
<option value="B"{if $product.forsale eq "B"} selected="selected"{/if}>{$lng.lbl_bundled}</option>
__________________
4.1.8
Xcart
Reply With Quote
  #5  
Old 09-03-2007, 06:52 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: default to available

Quote:
Originally Posted by concepts
This is what I came up with, I havent adjusted for product configurator, so if you use that, dont change the code. Use at your own risk and make backups





<select name="forsale">

<option value="Y"{if $product.forsale ne "N" && $product.forsale ne "H" && $product.forsale ne "B" } selected="selected"{/if}>{$lng.lbl_avail_for_sale}</option>
<option value="H"{if $product.forsale eq "H"} selected="selected"{/if}>{$lng.lbl_hidden}</option>
<option value="N"{if $product.forsale eq "N"} selected="selected"{/if}>{$lng.lbl_disabled}</option>
{if $active_modules.Product_Configurator}
<option value="B"{if $product.forsale eq "B"} selected="selected"{/if}>{$lng.lbl_bundled}</option>

What file are you modifying with this code?
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #6  
Old 09-03-2007, 07:43 AM
 
Victoria Feemster Victoria Feemster is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 45
 

Default Re: default to available

It is this file: product_details.tpl

I modified that one and it worked. Anyone know how to set the tax exempt and free shipping to default to yes?
__________________
Thank you,
Victoria Feemster
x-cart pro - 4.1.8
Reply With Quote
  #7  
Old 09-03-2007, 08:10 AM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: default to available

Got it - Here I pointed you at that file, and didn't think that was where you had made the mod.... <sigh>
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:07 AM.

   

 
X-Cart forums © 2001-2020