Skip to main content

Article Code Generator

More
13 years 11 months ago #70055 by mike
Article Code Generator was created by mike
Hello there

I would like to ask, if there is somehow a way to generate an article code like it's possible with the order number. There it is possible to specify the "Order number format" in the settings. This would be a super-nice feature for a possible next version if there is no way to specify the article format already.

Best regards
Mike

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

More
13 years 11 months ago #70117 by Xavier
Replied by Xavier on topic Re: Article Code Generator
Hi mike,

Yes actually it's not possible in HikaShop.
But I think that it can be added in the file "yourSite\administrator\components\com_hikashop\classes\product.php" in the function "save()".

Add a check after:
Code:
elseif(empty($element->product_code)){ return false; }
Like:
Code:
elseif(!empty($element->product_code) && preg_match("#^{#", "{my_code_format}")){ //do a preg_replace to remove the "{" & "}" tags. //select the max product id in the product table //format the new code }

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

Time to create page: 0.177 seconds
Powered by Kunena Forum