| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Duplicate Info From Custom Field | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Duplicate Info From Custom Field
Hi there,
I created a custom text field below Detailed Description to make it easier to display different types of information, it all works fine, but when I select a list of products and go to Modify Selected and check my custom field to get saved for all the rest items, it▓s not saving. Where do I missed something?
__________________
X-Cart version 4.5.5 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
It could be in the template code. Paste your template code Just the section around where you made the change, include the previous field and the following field. I'll take a look.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
Thanks for your time Mike!
/1/ Created a new column in xcart_products_lng_en mysql table, called custom_text. /2/ admin/product_modify.php $trusted_post_variables = array( 'product_lng', 'descr', 'fulldescr', 'posted_data', 'js_code', 'efields', 'custom_text', /** MY CUSTOM FIELD **/ ); /3/ include/product_modify.php // Fill all languages by default $int_descr_data = array( 'productid' => $productid, 'product' => $product, 'descr' => $descr, 'fulldescr' => $fulldescr, 'keywords' => $keywords, 'custom_text' /** MY CUSTOM FIELD **/ ); // Update product/descr/fulldescr/keywords $int_descr_data = array( 'product' => $product, 'descr' => $descr, 'fulldescr' => $fulldescr, 'keywords' => $keywords, 'custom_text' /** MY CUSTOM FIELD **/ ); // Update international descriptions $int_descr_data = array(); foreach ($query_data as $k => $v) { if (in_array($k, array('product', 'descr', 'fulldescr', 'keywords', 'custom_text'))) … func_unset($query_data, 'product', 'descr', 'fulldescr', 'keywords', 'custom_text'); … /4/ include/product_clone.php // Update just created product by values from existing product $query = array(); foreach ($product_info as $k=>$v) { if ( !is_numeric($k) && !in_array($k, array('productid', 'productcode', 'provider', 'add_date', 'views_stats', 'del_stats', 'sales_stats', 'product', 'descr', 'fulldescr', 'keywords', 'custom_text')) ) { $query[$k] = addslashes($v); } } /5/ skin/common_files/main/product_details.tpl <tr> {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="field[custom_text]" /></td>{/if} <td colspan="2" class="FormButton"> <div{if $active_modules.HTML_Editor and not $html_editor_disabled} class="description"{/if}>Custom Details 1:</div> <div class="description-data"> {include file="main/textarea.tpl" name="custom_text" cols=45 rows=12 class="InputWidth" data=$product.custom_text width="100%" btn_rows=4} </div> </td> </tr>
__________________
X-Cart version 4.5.5 |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
Why not use Extra Fields?
|
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
Quote:
__________________
X-Cart version 4.5.5 |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
You have it coded to save for the product itself but not for when it is multiple products. It is in the same product_modify.php and applies for $geid
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Duplicate Info From Custom Field
It's far easier to modify Extra Fields to allow more characters than to build your own Extra Fields system.
|
|||||||||
|
|||
X-Cart forums © 2001-2020
|