![]() |
Parent SKU for a item with variants?
Is there a way I can get the parent SKU on an invoice?
Right now it just shows the SKU of the item that was ordered, but I would also like to show the product code of the product. Basically I used the Product Code to group the variants together, and used the UPC's of the products for the variants. Thanks, Mike |
Re: Parent SKU for a item with variants?
Technically there is no root SKU if you used variants, as each of the variants is their own product.
|
Re: Parent SKU for a item with variants?
X-Cart only supplies the product code of the variant and not the product. You would need to modify the query in include/func/func_order.php function func_order_data to rename the products table productcode field to something like parentproductcode so that it doesn't get overlayed by the product code in the order_details table. It should then be available in the template as $product.parentproductcode.
|
Re: Parent SKU for a item with variants?
Quote:
|
Re: Parent SKU for a item with variants?
Quote:
Oh wow, works perfectly... THANKS! For anyone else I added: $sql_tbl[products].productcode as parentproductcode to the sql query in the query in the function above. |
All times are GMT -8. The time now is 01:28 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.