| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
default to available | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#3
|
|||||||
|
|||||||
![]() I would like to know where to edit this also.
__________________
Thank you, Victoria Feemster x-cart pro - 4.1.8 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Quote:
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 |
|||||||||
#6
|
|||||||
|
|||||||
![]() 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 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|