![]() |
SKU for variants way to long
Anyone know the answer to this.
Because of variants (colour & size) each variant is assigned it's own SKU - and because of the amount of options per size per colour some of the SKU's can get incredibly long (up to 12 digits) - is there anyway to truncuate the displayed SKU's down to the first 5 digits on emails, order history, invoices etc. as thats what we only ever use anyway? |
Just use the smarty truncate feature, similar to the way the short description is truncated in the cart...
{$products[prod_num].product|truncate:30:"...":true} Just do the same for whatever you want to shorten :) |
K and the next question is then when adding variants even if i have set the parent SKU as just numbers i.e 01743 in the SKU of varaints it still prefixs the numbers with the word SKU - any idea on how to stop it doing that?
|
bump - anyone got any clue on this one?
|
Quote:
It doesn't appear to do this in later unmodified versions (4.0.14 & up). The code that generates the SKU for the variants is in modules/Product_Options/func.php in func_rebuild_variants. At least in later versions there is a comment "Get unique SKU" just before the code that generates the SKU. You can tweak that code to do whatever you want. |
All times are GMT -8. The time now is 12:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.