- Posts: 152
- Thank you received: 0
Product Options Error
- plantpotphil
-
Topic Author
- Offline
I have just tried adding an option to a proudct and i get the following error on the product page on the front end:
Catchable fatal error: Object of class stdClass could not be converted to string in public_html/libraries/joomla/application/component/view.php on line 628.
Line 628 in that file is:
$option = preg_replace('/[^A-Z0-9_\.-]/i', '', $option);
Any idea what's causing this?
Thanks,
Phil
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
Three solutions:
1. you change that line by:
$option = preg_replace('/[^A-Z0-9_\.-]/i', '', JRequest::getString('option'));
2. You edit the file option of the view product via the menu Display->Views and you change the variable $option by $optionElement to avoid the conflict.
3. You deactivate that php option, supposing that you have access to your php.ini
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
Alternatively, what would be the repercussions of changing the $option = preg_replace('/[^A-Z0-9_\.-]/i', '', JRequest::getString('option')); line? Would this impact anything else ont he site? Or can it be changed without worry?
Thanks,
(I'm loving all the new features in the business edition by the way! Well worth the money)
Phil
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
Apparently you can do it with cpanel:
docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/PhpIni
It might or might not impact the rest of the website. I think it won't but you never know. You can always revert the change if you have a problem...
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
When you say "2. You edit the file option of the view product via the menu Display->Views and you change the variable $option by $optionElement to avoid the conflict." do you mean change all instances of $option to $optionElement in that view?
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
As another issue, the option doesn't seem to list anywhere on the page?
Where are options supposed to be displayed? :huh:
I have attached my view Product > Show.php in case its something in there which i causing the issue.
This attachment is hidden for guests.
Please log in or register to see it.
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
That is the only modification I have made in that view. File attached.
This attachment is hidden for guests.
Please log in or register to see it.
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.
/administrator/index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=15
Please Log in or Create an account to join the conversation.
- plantpotphil
-
Topic Author
- Offline
- Posts: 152
- Thank you received: 0
I didn't realise you needed to hit the product save button after hitting the 'ok' button in the product options squeezebox.
sorry for wasting your time!!
Create your own style of luxury bespoke furniture online
Please Log in or Create an account to join the conversation.