automaticly add code when adding a new product

  • Posts: 34
  • Thank you received: 0
11 years 5 months ago #104131

Hi,

i am using the business edition of hikashop, and i was wondering if it would be possible when adding a new product, the code(The code of the product is a unique identifier for each product, each variant)added automaticly?

it would be much easier if we have not come up with a new code every time, when adding a new product to the shop.
I know I need to change some settings in the database, but what should I change in the script?

Kind Regards,

Ralph

Attachments:

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
11 years 5 months ago #104153

Hi,

The code is already automatically filled if you don't enter anything in it so I'm not sure I understand what you want ?

The following user(s) said Thank You: war relics

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

  • Posts: 34
  • Thank you received: 0
11 years 5 months ago #104158

Nicolas,

I forgot to say that the code must be about something like this: xxxxxx2013 (something about 8/10 digits)
Because the problem is if you enter anything in it, it gets automatically the product name.
And that is something we just do not want to have.

Hopefully you understand my problem.

Kind Regards,

Ralph

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
11 years 5 months ago #104171

Hi,

If you want to enter the product code automatically, you can create a HikaShop plugin and implement in it the onBeforeProductCreate trigger and set the $element->product_code the way you want it in it.
www.hikashop.com/en/support/documentatio...nBeforeProductCreate

The following user(s) said Thank You: war relics

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

  • Posts: 34
  • Thank you received: 0
11 years 5 months ago #104184

Nicolas,

it may sound stupid but how do I make a Hikashop plugin?
Is it possible to do this in Hikashop or Joomla?

Kind regards,

Ralph

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
11 years 5 months ago #104186

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

Time to create page: 0.064 seconds
Powered by Kunena Forum