Custom Fields in Different Categories

  • Posts: 18
  • Thank you received: 1
9 years 7 months ago #215006

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.37
-- Browser(s) name and version -- : Version 45.0.2454.99 m
-- Error-message(debug-mod must be tuned on) -- : Error
Please complete the Type field

Please complete the Milk Type field

Please complete the Pasteurised/Unpasteurised field

Please complete the Rennet field

Please complete the Country field

Please complete the Region field

Error Saving

No error message but since upgrading HikaShop custom fields are no longer working correctly. We have created 6 mandatory custom fields which apply to one category. However since upgrading HikaShop when we try and create a product in a different category we are prompted to enter values for the custom fields of the other category even though the custom fields do not appear on the form.

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

  • Posts: 26233
  • Thank you received: 4036
  • MODERATOR
9 years 7 months ago #215026

Hi,

Thanks for the report.
In the file "administrator/components/com_hikashop/classes/product.php" please replace

		} else {
			if(!hikashop_acl('product/add'))
				return false;
		}
By
		} else {
			$oldProduct = new stdClass();
			$oldProduct->categories = array(0);
			if(!empty($formProduct['categories']))
				$oldProduct->categories = $formProduct['categories'];
			JArrayHelper::toInteger($oldProduct->categories);
			if(!hikashop_acl('product/add'))
				return false;
		}
It should fix your issue.
We will include that patch in the next HikaShop 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.

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

  • Posts: 18
  • Thank you received: 1
9 years 7 months ago #215138

Thanks Jerome,

That seems to have fixed the issue.

Regards,

Ralf

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

Time to create page: 0.054 seconds
Powered by Kunena Forum