AbanteCart Community

AbanteCart Development => Customization help => Topic started by: Reggy on March 15, 2018, 05:52:39 AM

Title: Edit of EMAIL CONFIRM
Post by: Reggy on March 15, 2018, 05:52:39 AM
Hi,

can you someone give me advice how to edit email confirm?

I want to change line 93, at: view\default\template\mail\order_confirm.tpl

<td class="align_left"><?php echo $product['model']; ?></td>

 - it shows product model number and i need change it for product option SKU number, but when i change $product['model'] for $option['sku'] it doesn't work. In invoice it works

Sorry for bad english and thank you for answers.
Title: Re: Edit of EMAIL CONFIRM
Post by: Sam_78 on March 15, 2018, 09:35:59 AM
Try $product_info['sku']
Title: Re: Edit of EMAIL CONFIRM
Post by: Reggy on March 15, 2018, 03:35:31 PM
Thank you for anwer,

unfortunately $product_info['sku'] and $product_option['sku'] doesn't work. It may be necessary to change it something in some controller. :(
Title: Re: Edit of EMAIL CONFIRM
Post by: abolabo on March 19, 2018, 05:34:33 AM
1. open file public_html/storefront/model/checkout/order.php and go to line 575
2. replace
Code: [Select]
"SELECT oo.*, po.element_type, p.sku, p.product_id with

Code: [Select]
"SELECT oo.*, po.element_type, COALESCE(po.sku,p.sku) as sku, p.product_id
3. replace model to sky in your  view\default\template\mail\order_confirm.tpl
Code: [Select]
<td class="align_left"><?php echo $product['sku']; ?></td>
Title: Re: Edit of EMAIL CONFIRM
Post by: Reggy on April 17, 2018, 04:59:07 AM
Hi,

I have this error in Error Log:

database error: AbanteCart core v.1.2.12 SQL Error: Unknown column 'po.sku' in 'field list'
Error No: 1054
SQL: SELECT oo.*, po.element_type, COALESCE(po.sku, p.sku) as sku, p.product_id
FROM abc_order_options oo
.
.
.
Title: Re: Edit of EMAIL CONFIRM
Post by: yonghan79 on April 17, 2018, 09:12:47 PM
Hi, what is your AbanteCart version?
Title: Re: Edit of EMAIL CONFIRM
Post by: Reggy on April 18, 2018, 05:22:49 AM
Hi,

AbanteCart Version 1.2.12 + folder storefront and admin is about 2 months old
Title: Re: Edit of EMAIL CONFIRM
Post by: Basara on April 18, 2018, 06:40:05 AM
Looks like you did not upgrade to 1.2.12 correctly
Title: Re: Edit of EMAIL CONFIRM
Post by: yonghan79 on April 18, 2018, 11:29:35 PM
I just checked the product_options table schema and the it doesn't has the sku column. That's why you get the error. I think we should ask the AbanteCart developers add the sku in the next version.
Title: Re: Edit of EMAIL CONFIRM
Post by: Basara on April 19, 2018, 03:59:29 AM
I just checked the product_options table schema and the it doesn't has the sku column. That's why you get the error. I think we should ask the AbanteCart developers add the sku in the next version.

SKU is not a part of the product_options table
SKU for option values stored in the ac_product_option_values and ac_order_options. The error usually appear if store was not upgraded correctly from older version to 1.2.12
Title: Re: Edit of EMAIL CONFIRM
Post by: yonghan79 on April 19, 2018, 04:04:57 AM
I just checked the product_options table schema and the it doesn't has the sku column. That's why you get the error. I think we should ask the AbanteCart developers add the sku in the next version.

SKU is not a part of the product_options table
SKU for option values stored in the ac_product_option_values and ac_order_options. The error usually appear if store was not upgraded correctly from older version to 1.2.12

Thanks for the information Basara.

Try to change COALESCE(po.sku,p.sku) to COALESCE(pov.sku,p.sku). Hope it works.
Title: Re: Edit of EMAIL CONFIRM
Post by: aliciaR on June 07, 2020, 03:25:05 PM
I just checked the product_options table schema and the it doesn't has the sku column. That's why you get the error. I think we should ask the AbanteCart developers add the sku in the next version.
Title: Re: Edit of EMAIL CONFIRM
Post by: Basara on June 08, 2020, 01:30:12 AM
Hello.
The SKUs are in the options values, not in the option.
If you have option Color the SKUs will be in its values Green, Black, etc
https://abantecart.atlassian.net/wiki/spaces/AD/pages/9568257/Manage+Products+Options#ManageProductsOptions-AddingOptionValues