Product key as alias

  • Posts: 55
  • Thank you received: 0
  • Hikashop Business
4 years 10 months ago #317841

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.12

The alias that is now being created, automasch comes from the product name.
it is possible to do this from the product code.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 10 months ago #317853

Hi,

There is no option for that.
However, you can create a mass action with a trigger "on before product create" and another "on before product update", with an action "update the values" where you select the column "product_alias" and you use the "operation" mode of the action with the value "product.product_code" and it should do what you want.

The following user(s) said Thank You: webmasterab

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

  • Posts: 55
  • Thank you received: 0
  • Hikashop Business
4 years 10 months ago #317881

I have this now, is this correct?
And I can put both actions in 1 mass action.

Attachments:

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 10 months ago #317887

Hi,

As I said, you need to select "operation" not "int".
And you need to add a second trigger "after a product is updated" so that it also works when you save a product that was already created before.

The following user(s) said Thank You: webmasterab

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

  • Posts: 55
  • Thank you received: 0
  • Hikashop Business
4 years 10 months ago #318296

I have changed the product key on an existing product, but it is not converted to the product alias.
Whatever I change in the product key and I save that it is not converted to the alias.
not even if I empty it and then save it.

So it is not overwritten.

And it is also possible to do it for the existing products in one go.

I created the mass action as you said.


Attachments:
Last edit: 4 years 10 months ago by webmasterab.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 10 months ago #318334

Hi,

As I said in my previous message, you need to use the trigger "after a product is updated".
I've done a test on my end and it works just fine:
monosnap.com/file/ZdA8AcjRwS2PRFVHT72RN5sBLnlxew

And if you want to do it on all the products in one go, you can click on the "process" button of the mass action.
It will do the action for the first 500 products it founds unless you change the start and value in the "limitations" area of the mass action.

The following user(s) said Thank You: webmasterab

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

Time to create page: 0.082 seconds
Powered by Kunena Forum