Skip to main content

cannot set a product to the discount in frontend.

11 years 1 month ago #215329 by BluepointWebdesign
-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.5
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.5.x
-- Error-message(debug-mod must be tuned on) -- : no message

Hello,
Please help,
we are trying to set discounts throught the frontend of hikashop/hikamarket. But we can make a discount but when applying it to a product and when we save, it won't store the product to the discount?
we are testing it on www.01.uw-hiow-concept.nl
what could be possible wrong?
I added a little screenshot, in the screenshot you see one product in the discount but when we try to set the 2e for the same discount the second one or even with a new discount setting the first one will not be save and so the discount is not set to the product?
Hope u understand..
Thanks

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

11 years 1 month ago #215334 by Jerome
Hi,

Thanks for the report.
In the file "administrator/components/com_hikamarket/classes/discount.php" please replace
Code:
foreach($formData['discount'] as $column => $value) { hikamarket::secureField($column); $discount->$column = strip_tags($value); }
By
Code:
$nameboxes = array('discount_product_id','discount_category_id','discount_zone_id'); $safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1); foreach($formData['discount'] as $column => $value) { hikamarket::secureField($column); if(in_array($column,$nameboxes)) { if($column == 'discount_zone_id') { $discount->$column = array(); foreach($value as $i => $v) { $discount->{$column}[] = $safeHtmlFilter->clean(strip_tags($v), 'string'); } } else { JArrayHelper::toInteger($value); } $discount->$column = $value; } else { $discount->$column = $safeHtmlFilter->clean(strip_tags($value), 'string'); } }
It should fix your issue.
That patch will be include in the next release.

regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: BluepointWebdesign

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

11 years 1 month ago #215464 by BluepointWebdesign
As far as saw it helped to fix the issue..
Thank u very much..
:cheer:

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

Moderators: Obsidev
Time to create page: 0.075 seconds
Powered by Kunena Forum