Order Number code

  • Posts: 215
  • Thank you received: 13
3 months 2 weeks ago #367831

-- HikaShop version -- : 6.0.0
-- Joomla version -- : 5.3.2
-- PHP version -- : 8.1

how can i set my order code generation number to start with 100001 (not 000001)

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

  • Posts: 84582
  • Thank you received: 13752
  • MODERATOR
3 months 2 weeks ago #367832

Hi,

Go in your PHPMyAdmin and change the auto_increment of the hikashop_order table to 100000
Next order will be 100001 automatically.
stackoverflow.com/questions/5665571/auto...rement-in-phpmyadmin

The following user(s) said Thank You: khashiz

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

  • Posts: 215
  • Thank you received: 13
3 days 22 hours ago #369106

can i do the same for product codes ?
i want each product code be a number like 1001, 1002, 1003 and so on

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

  • Posts: 84582
  • Thank you received: 13752
  • MODERATOR
3 days 25 minutes ago #369116

Hi,

The product code is not generated by HikaShop. It's something you can enter in the "product code" input field of each product. So you can use the format you want without changing anything in HikaShop.

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

  • Posts: 215
  • Thank you received: 13
2 days 22 hours ago #369117

I know
this is exactly what i want to do ... to create the product codes automaticly
somthing like auto increament of product ids

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

  • Posts: 84582
  • Thank you received: 13752
  • MODERATOR
2 days 7 minutes ago #369118

Hi,

Then, you can create a massaction with triggers "when product is created" and "when product is updated" and an action "update the values" on the "product_code" column with the mode "operation" and the value: product.product_id
This way, the product code will get the id of the product as value automatically.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum