cannot set a product to the discount in frontend.

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
8 years 5 months ago #215329

-- 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

Attachments:

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

  • Posts: 25990
  • Thank you received: 4002
  • MODERATOR
8 years 5 months ago #215334

Hi,

Thanks for the report.
In the file "administrator/components/com_hikamarket/classes/discount.php" please replace

		foreach($formData['discount'] as $column => $value) {
			hikamarket::secureField($column);
			$discount->$column = strip_tags($value);
		}
By
		$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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: BluepointWebdesign

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

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
8 years 5 months ago #215464

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.062 seconds
Powered by Kunena Forum