Skip to main content

upload fields not consistent when editing productr

More
11 years 2 months ago #209397 by jouwnaambord.nl
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

Hi,

There seems to be some bug in the editing of a product that's in an order. When the product is edited, the upladed files are not linked to the orderproduct anymore and there is a array field instead of the link to the file. See screenshot attached.


Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #209413 by nicolas
Hi,

Could you please provide a screenshot of the settings of your custom field ?

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #209525 by jouwnaambord.nl

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #209580 by Jerome
Hi,

Thanks for the report.

Please edit the file "administrator/components/com_hikashop/classes/order.php" and replace
Code:
if(isset($productData['order_id'])) { $product = new stdClass(); foreach($productData as $key => $value) { hikashop_secureField($key); $product->$key = $safeHtmlFilter->clean($value, 'string'); }
By
Code:
if(isset($productData['order_id'])) { $product = new stdClass(); $fieldClass = hikashop_get('class.field'); $oldData = null; $item_fields = $fieldClass->getData('backend', 'item'); $fieldClass->_checkOneInput($item_fields, $productData, $product, 'item', $oldData); foreach($productData as $key => $value) { hikashop_secureField($key); if(isset($items_fields[$key])) continue; $product->$key = $safeHtmlFilter->clean($value, 'string'); }
It should fix the issue by using the field class to save the custom fields in the order product.

I will submit the patch to the rest of the team (with other little modifications), which should be include in the next release.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.212 seconds
Powered by Kunena Forum