product class data missing

  • Posts: 252
  • Thank you received: 1
8 years 4 months ago #244473

-- HikaShop version -- : HikaShop Business 2.6.3
-- HikaMarket version -- : HikaMarket Multivendor 1.7.0
-- Joomla version -- : 3.5
-- PHP version -- : 5.5.12
-- Browser(s) name and version -- : Chrom

Hi there,
I have a question about this custom WYSIWYG (JCE)field I created, I wrote a plugin for onAfterProductCreate, and in the test process I did put content in it, but the plug in code showed this field was empty.
This did not happen when I use the back-end to edit a product, and there is no problem for the "product description field" in the front-end either. Could you help to see what was missing?

Best Regards
Scott

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 4 months ago #244474

Hi,

I am sorry but I am not able to understand your message.

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: 252
  • Thank you received: 1
8 years 4 months ago #244513

Hi,
It's hard to explain, because this is a coding problem.
Here I will show you steps to reproduce my problem.
1. In back-end, new a custom field, Type:WYSIWYG
2. Create a plug-in in plugiss\hikashop\myPlugin
3. Edit public function onAfterProductCreate(&$element){
$thisProduct = $this->getProduct($element->product_id);
echo $thisProduct->myField;
}
4. In the debug mode and create a new product
if I am in front-end, $thisProduct->myField; ... "" <-- it shows empty, but I have input data in it.
if I am in back-end, $thisProduct->myField; ... "the html code I input"

I hope this is clear enough for you,

Best Regards
Scott

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 4 months ago #244558

Hi,

If your WYSIWYG editor is TinyMce (or simple text area), do you have the same issue ?

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: 252
  • Thank you received: 1
8 years 4 months ago #244599

HI Jerome,
Attached please find my screenshot.
I've changed the editor to TinyMce, and there is still no data.

BR

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 4 months ago #244600

Hi,

I am sorry but I cannot reproduce your issue.
I have a wysiwyg product custom field and I can save it without any issue in my products.

Now the code you're using does not seem good to me ; there is no need to perform a "get" on a product while you have the entire product object in parameter.
I don't know what your function is ; but I know that the save in HikaMarket is working fine. And if the "save" is good, the content provided the trigger should be too.

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: 252
  • Thank you received: 1
8 years 4 months ago #244618

Hi, Jerome,
I think I know what the problem is, but I still need your help, I am not sure if I miss setting config.
When I put same text into the description and my_custom_field, one shows the HTML code, and the other one is plain text.



When I put the img into them, description shows HTML code, and my_custom_field shows empty, and this is my problem.


How should I set it to save data in HTML code?

Thanks
Best Regards

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 4 months ago #244646

Hi,

That's the role of the HikaShop "input filtering" setting in your custom field configuration.

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: 252
  • Thank you received: 1
8 years 4 months ago #244679

Hi Jerome,
It works, Thank you very much.

Best Regards

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

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