Neo_odessa Posted November 27, 2014 Share Posted November 27, 2014 (edited) Hello. Need help with code. Trying to make text Field in product line. In order details. I was modified 2 files. /admin/themes/default/template/controllers/orders/_product_line.tpl Code <span class="product_quantity_edit"> <input type="text" name="product_quantity_collected" class="edit_product_quantity" value="{$product['product_quantity_collected']|htmlentities}"/> <input type="submit" value="Save"/> </span> And /controllers/admin/AdminOrdersController.php if (Tools::getValue('product_quantity_collected')) $product['product_quantity_collected'] = Tools::getValue('product_quantity_collected'); Problem is 1. I can make changes only in last product in list. And it value gives to each product. 2. when Im leaving order details all data dissapearing. And when Ill go to order details next time its empty. Screen Please help me with this. Edited November 27, 2014 by Neo_odessa (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 27, 2014 Share Posted November 27, 2014 each prduct line must have different <input> field name otherwise php will always use last one Link to comment Share on other sites More sharing options...
Neo_odessa Posted November 27, 2014 Author Share Posted November 27, 2014 (edited) How to use different names for <input> fields? In template I have only 1 line to edit. I`ve deleted <input type="submit" value="Save"/> And using {* Update controls *} <button type="button" class="btn btn-default submitProductChange" style="display: none;"> <i class="icon-ok"></i> {l s='Update'} To submit value. But after refreshing page all data erasing. How to save it? Edited November 28, 2014 by Neo_odessa (see edit history) Link to comment Share on other sites More sharing options...
Neo_odessa Posted December 1, 2014 Author Share Posted December 1, 2014 Somebody can help me. Have an idea why data loosing? I hope to find the solution. Link to comment Share on other sites More sharing options...
salvorezo Posted May 22, 2020 Share Posted May 22, 2020 (edited) Hi, did you solve this problem? I'd be interested too Edited May 22, 2020 by salvorezo (see edit history) Link to comment Share on other sites More sharing options...
salvorezo Posted May 22, 2020 Share Posted May 22, 2020 On 12/1/2014 at 7:12 AM, Neo_odessa said: Somebody can help me. Have an idea why data loosing? I hope to find the solution. Hi, did you solve this problem? I'd be interested too Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now