[Skip to main content](#vessel-content)

#   Mass action value update using PHP code

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 7 months ago [\#193002](#193002) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193002 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.3.5

After an OnBeforeUpdate event I want product_description fieldcontent to be updated with the values of several custom_fields. Like:
Code:

"Special Weight:'.this-&gt;product_special_weight.' Color: '.this-&gt;product_color

Is it possible to do?

How should be the code be written inside the text box marked in red?

[ ![Captura&#95;de&#95;pantalla&#95;2015-03-03&#95;a&#95;les&#95;18&#95;17&#95;28.png](/forum/attachment/22791) ](/forum/attachment/22791 "...s&#95;18&#95;17&#95;28.png")

- [ ![Captura&#95;de&#95;pantalla&#95;2015-03-03&#95;a&#95;les&#95;18&#95;17&#95;28.png](/forum/attachment/22791) ](/forum/attachment/22791 "...s&#95;18&#95;17&#95;28.png") [ ](/forum/attachment/22791?download=1 "...s&#95;18&#95;17&#95;28.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#193057](#193057) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193057 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

You have to use that syntax: Code:

Special Weight: {product_special_weight} Color: {product_color}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 7 months ago [\#193084](#193084) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193084 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Good, this looks quite simple!

And, would be possible to include a Category Name or a Brand Name?

As far as I know the names of category are stored in another table so this would require some special syntax or some SQL query involved... unless you have a trick for this which would be great

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#193087](#193087) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193087 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

At this time it is only possible to fill with values of the same table...
To have other entries it will require more requests.

Else you can create custom product field, and populate them with the desired data ![:)](/media/kunena/emoticons/8.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 7 months ago [\#193176](#193176) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193176 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Thank you. To go further in understanding the functionalities of mass actions which look very powerful could you explain me what is the function of the action "Display the results" ?

Where and when are the results displayed?

Can they be piped to a field, variable or 'something' where it can be picked form?

[ ![Captura&#95;de&#95;pantalla&#95;2015-03-04&#95;a&#95;les&#95;22&#95;31&#95;56.png](/forum/attachment/22803) ](/forum/attachment/22803 "...s&#95;22&#95;31&#95;56.png")

Have you plans to create more extensive documentation in the topic of Mass Action? It would help a lot to have some more examples or and extra explanations.

- [ ![Captura&#95;de&#95;pantalla&#95;2015-03-04&#95;a&#95;les&#95;22&#95;31&#95;56.png](/forum/attachment/22803) ](/forum/attachment/22803 "...s&#95;22&#95;31&#95;56.png") [ ](/forum/attachment/22803?download=1 "...s&#95;22&#95;31&#95;56.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#193265](#193265) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#193265 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

The "Display the results" action allow to display the desired results when clicking on the "Process" button.
It can't work with a trigger, it must only be used when in backend.

The it will display a table with all the results, and the subtility is that this table is dynamic, you can clic on one row and change a value directly. So it can help to save time ![;)](/media/kunena/emoticons/11.png ";)")

Yes, we must improve the mass action documentation, do more tutorials etc. It is on our Todo list, and I have to do that as soon as possible ![:)](/media/kunena/emoticons/8.png ":)")

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 10 months ago -  10 years 10 months ago [\#223211](#223211) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223211 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

I tried Xavier's suggestion for categories without success:

> You have to use that syntax:
> Special Weight: {product\_special\_weight} Color: {product\_color}

**I did this**

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-05&#95;a&#95;les&#95;17&#95;52&#95;57.png](/forum/attachment/28249) ](/forum/attachment/28249 "...s&#95;17&#95;52&#95;57.png")

**but as a result after saving I get this**

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-05&#95;a&#95;les&#95;17&#95;58&#95;43.png](/forum/attachment/28250) ](/forum/attachment/28250 "...s&#95;17&#95;58&#95;43.png")

am I missing something?

- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-05&#95;a&#95;les&#95;17&#95;52&#95;57.png](/forum/attachment/28249) ](/forum/attachment/28249 "...s&#95;17&#95;52&#95;57.png") [ ](/forum/attachment/28249?download=1 "...s&#95;17&#95;52&#95;57.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-05&#95;a&#95;les&#95;17&#95;58&#95;43.png](/forum/attachment/28250) ](/forum/attachment/28250 "...s&#95;17&#95;58&#95;43.png") [ ](/forum/attachment/28250?download=1 "...s&#95;17&#95;58&#95;43.png")

Last edit: 10 years 10 months ago by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 10 months ago [\#223296](#223296) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223296 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

The correct syntax is finally:

> category.cat\_name\_spanish

You have to select "Operation" instead of "String", and "cat_name_spanish" must be a valid category custom field column name.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 10 months ago [\#223315](#223315) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223315 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Ok, this looks good but sadly not working:

I made this

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;51&#95;18.png](/forum/attachment/28280) ](/forum/attachment/28280 "...s&#95;11&#95;51&#95;18.png")

the custom field exists

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;52&#95;01.png](/forum/attachment/28281) ](/forum/attachment/28281 "...s&#95;11&#95;52&#95;01.png")

and I get this error message

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;53&#95;03.png](/forum/attachment/28282) ](/forum/attachment/28282 "...s&#95;11&#95;53&#95;03.png")

I guess there is some wrong or "unflexible" code as the query tries to invoke hk_cat where my phpAdmin shows me this other table as the one holding the categories: **tpjtx\_hikashop\_category**

Of course I only have means to decide the general joomla prefix tpjtx_ but no the names of the hikashop tables.

Could you confirm that is a code thing and not a bad understanding of Mas Actions from my side?

Regards,

- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;51&#95;18.png](/forum/attachment/28280) ](/forum/attachment/28280 "...s&#95;11&#95;51&#95;18.png") [ ](/forum/attachment/28280?download=1 "...s&#95;11&#95;51&#95;18.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;52&#95;01.png](/forum/attachment/28281) ](/forum/attachment/28281 "...s&#95;11&#95;52&#95;01.png") [ ](/forum/attachment/28281?download=1 "...s&#95;11&#95;52&#95;01.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-07&#95;a&#95;les&#95;11&#95;53&#95;03.png](/forum/attachment/28282) ](/forum/attachment/28282 "...s&#95;11&#95;53&#95;03.png") [ ](/forum/attachment/28282?download=1 "...s&#95;11&#95;53&#95;03.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 10 months ago [\#223327](#223327) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223327 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

This is indeed a code issue, not a bad understanding.
But I was not able to reproduce the issue on my end, do you have the latest version of HikaShop ?
Any overrides on the plugin "hikashop / massaction_category" ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 10 months ago -  10 years 10 months ago [\#223407](#223407) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223407 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

You have the latest stable version of HikaShop Business: 2.6.0

no overrides

––––––––––––––––

And this is how is referenced in the code for **/plugins/hikashop/massaction\_category/massaction\_category.php**

read at line 63

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-08&#95;a&#95;les&#95;0&#95;21&#95;25.png](/forum/attachment/28305) ](/forum/attachment/28305 "...es&#95;0&#95;21&#95;25.png")

file version

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-08&#95;a&#95;les&#95;0&#95;23&#95;32.png](/forum/attachment/28306) ](/forum/attachment/28306 "...es&#95;0&#95;23&#95;32.png")

may I change 'hk_category' for hikashop_category' in all files containing it?

it sounds radical and dirty... but if we don't find why is going this way it maybe effective

- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-08&#95;a&#95;les&#95;0&#95;21&#95;25.png](/forum/attachment/28305) ](/forum/attachment/28305 "...es&#95;0&#95;21&#95;25.png") [ ](/forum/attachment/28305?download=1 "...es&#95;0&#95;21&#95;25.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-08&#95;a&#95;les&#95;0&#95;23&#95;32.png](/forum/attachment/28306) ](/forum/attachment/28306 "...es&#95;0&#95;23&#95;32.png") [ ](/forum/attachment/28306?download=1 "...es&#95;0&#95;23&#95;32.png")

Last edit: 10 years 10 months ago by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 10 months ago [\#223412](#223412) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223412 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

original file attached.

Maybe is of use to you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 10 months ago -  10 years 10 months ago [\#223432](#223432) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Mass action value update using PHP code](/forum/32-content-creation/875389-mass-action-value-update-using-php-code#223432 "-- HikaShop version -- : 2.3.5  After an OnBeforeUpdate event I want product&#95;description fieldcontent to be updated with the values of several custom&#95;fields. Like:  Is it possible to do?  How should be the code be written inside the text box marked in red?")*

Hi,

Please install this plugin, this will solve the issue:

*This attachment is hidden for guests.
Please log in or register to see it.*

This was caused by your custom field name. We were taking it and exploding it on '_' so we were using in this case the prefix "cat" and not "category". I changed that to force the "category" alias as we are only applying changes on the category columns.

Last edit: 10 years 10 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2NvbnRlbnQtY3JlYXRpb24vODc1Mzg5LW1hc3MtYWN0aW9uLXZhbHVlLXVwZGF0ZS11c2luZy1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.142 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
