[Skip to main content](#vessel-content)

#   Product - Variant codes

##

- **[expertbeginner](/forum/user/4889-expertbeginner "View expertbeginner's Profile")**
- [![expertbeginner's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4889-expertbeginner "View expertbeginner's Profile") Topic Author
- [ Offline](/forum/user/4889-expertbeginner)

Less More

- Posts: 57
- Thank you received: 2
-
-

11 years 10 months ago [\#184911](#184911) by [expertbeginner](/forum/user/4889-expertbeginner "View expertbeginner's Profile")  *[Product - Variant codes](/forum/4-how-to/873940-product-variant-codes#184911 "-- url of the page with the problem -- : local test server -- HikaShop version -- : 2.3.5 -- Browser(s) name and version -- : N/A -- Error-message(debug-mod must be tuned on) -- : N/A  Hi,  Having just renewed my subscription I've updated to the latest version of Hikashop on a local test server and have discovered that the mod to achieve the change of product code (from xxxx&#95;1 etc to xxxx01, xxxx02 - Post #34414 refers) is no longer a workable solution.  I've tried to find where the product code is generated in product.php and think it's somewhere around lines 770, but am unable to identify exactly what needs changing. Also I've been unable to identify any other code that may be affected and require modification.  With the major changes that have been made to the code, what is the feasibility of implementing the requirement?  Thanks in anticipation of a workable solution. Regards, Martyn")* was created by *[expertbeginner](/forum/user/4889-expertbeginner "View expertbeginner's Profile")*

-- url of the page with the problem -- : local test server
-- HikaShop version -- : 2.3.5
-- Browser(s) name and version -- : N/A
-- Error-message(debug-mod must be tuned on) -- : N/A

Hi,

Having just renewed my subscription I've updated to the latest version of Hikashop on a local test server and have discovered that the mod to achieve the change of product code (from xxxx_1 etc to xxxx01, xxxx02 - Post #34414 refers) is no longer a workable solution.

I've tried to find where the product code is generated in product.php and think it's somewhere around lines 770, but am unable to identify exactly what needs changing. Also I've been unable to identify any other code that may be affected and require modification.
Code:

$query = 'UPDATE ' . hikashop_table('product') . ' AS p ' . ' SET p.product_code = CONCAT(p.product_code,\'_'.(int)$characteristics[(int)$a]-&gt;default_id.'\') '. ' WHERE p.product_parent_id = ' . (int)$product_id . ' AND p.product_type = ' . $this-&gt;database-&gt;Quote('variant') . ' AND p.product_code LIKE '.$product_code;

With the major changes that have been made to the code, what is the feasibility of implementing the requirement?

Thanks in anticipation of a workable solution.
Regards,
Martyn

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3Mzk0MC1wcm9kdWN0LXZhcmlhbnQtY29kZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

11 years 10 months ago [\#184928](#184928) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product - Variant codes](/forum/4-how-to/873940-product-variant-codes#184928 "-- url of the page with the problem -- : local test server -- HikaShop version -- : 2.3.5 -- Browser(s) name and version -- : N/A -- Error-message(debug-mod must be tuned on) -- : N/A  Hi,  Having just renewed my subscription I've updated to the latest version of Hikashop on a local test server and have discovered that the mod to achieve the change of product code (from xxxx&#95;1 etc to xxxx01, xxxx02 - Post #34414 refers) is no longer a workable solution.  I've tried to find where the product code is generated in product.php and think it's somewhere around lines 770, but am unable to identify exactly what needs changing. Also I've been unable to identify any other code that may be affected and require modification.  With the major changes that have been made to the code, what is the feasibility of implementing the requirement?  Thanks in anticipation of a workable solution. Regards, Martyn")*

Hi,

I've replied to you over there:
[ www.hikashop.com/support/forum/4-how-to/...ant-code.html#184927](http://www.hikashop.com/support/forum/4-how-to/34414-change-format-of-variant-code.html#184927)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3Mzk0MC1wcm9kdWN0LXZhcmlhbnQtY29kZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
