Price changer Action Button

  • Posts: 48
  • Thank you received: 3
7 months 2 hours ago #360480

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 5.1.0
-- PHP version -- : 8.1

Hi
i'm trying to create an action button which adds the stable amount of $10 to selected products

for example i select 3 products with prices of $10 , $20 and $30
when I click this button i want the prices to be changed to $20, $30, $40

i created a mass action with this code but it didnt work :
{price_value} = {price_value}+10

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

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
6 months 4 weeks ago #360487

Hi,

In your mass action, you need an action "update the values" on the "price_value" column.
Select the "operation" mode and enter the operation:

{price.price_value}+10

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

  • Posts: 48
  • Thank you received: 3
6 months 4 weeks ago #360495

I did exactly what you said.
I get the error :
The table {price does not exist

I attached screenshots of my mass ation and the error



Attachments:

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

  • Posts: 48
  • Thank you received: 3
6 months 4 weeks ago #360500

I removed { } and problem is solved now. thank you alot.
the correct operation was :
price.price_value+10 instead of {price.price_value}+10

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

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
6 months 4 weeks ago #360522

Hi,

Sorry. Indeed, the {} should not be added.
I mixed it up with email tags.

The following user(s) said Thank You: demoisellegol

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

Time to create page: 0.072 seconds
Powered by Kunena Forum