X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   default to available (https://forum.x-cart.com/showthread.php?t=33640)

concepts 09-02-2007 10:50 AM

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>

Vacman 09-02-2007 11:12 AM

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?

Victoria Feemster 09-02-2007 08:21 PM

Re: default to available
 
I would like to know where to edit this also.

concepts 09-03-2007 04:37 AM

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>

Vacman 09-03-2007 06:52 AM

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?

Victoria Feemster 09-03-2007 07:43 AM

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?

Vacman 09-03-2007 08:10 AM

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>


All times are GMT -8. The time now is 05:26 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.