1
속성 product_serial_description을 작성하고 속성 세트도 추가 했으므로이 속성 값을 이메일 송장 템플릿에 표시하고 싶습니다. 내가 어떻게 할 수 있니?Magento 1.9의 송장에 새 제품 속성을 추가하십시오.
속성 product_serial_description을 작성하고 속성 세트도 추가 했으므로이 속성 값을 이메일 송장 템플릿에 표시하고 싶습니다. 내가 어떻게 할 수 있니?Magento 1.9의 송장에 새 제품 속성을 추가하십시오.
전자 메일 및 송장 전자 메일의 주문 항목 옵션 및 사용자 지정 옵션과 함께 추가 제품 특성 값을 추가하는 방법을 보여 드리겠습니다. 여기
이 추가 제품 속성이 표시 얻을 주문 및 송장 전자 메일을 작동합니다 코드 : 항목에서 사용자 정의 옵션 및/또는 항목 옵션을 표시하기 위해$productId = $_item->getProduct()->getId(); //for order emails
//$productId = $_item->getProductId(); //for invoice emails
$product = Mage::getModel('catalog/product')->load($productId);
$attributes = $product->getAttributes();
//Get a list of all PRODUCT ATTRIBUTES you want to show in this array...
$dispAttribs = array('hardrive', 'memory', 'processor');
foreach ($attributes as $attribute) {
$attributeCode = $attribute->getAttributeCode();
if(!in_array($attributeCode, $dispAttribs)) continue;
$label = $attribute->getFrontend()->getLabel($product);
$value = $attribute->getFrontend()->getValue($product);
echo "<br /><strong>" . $label . ":</strong> " . $value;
}
, 이것을 사용 :
foreach($this->getItemOptions() as $opt) {
if(isset($opt['option_id'])) { //for CUSTOM OPTIONS
echo "<strong>" . $opt['label'] . ":</strong> ". $opt['option_value'] . "<br />";
} else { //for ITEM OPTIONS
echo "<strong>" . $opt['label'] . ":</strong> ". $opt['value'] . "<br />";
}
}
이메일을 주문하려면 코드를 추가
, 코드가 가야 할 파일은 다음과 같습니다
app/design/frontend/base/default/template/email/order/items/order/default.phtml
,691 이메일을 청구 할 코드를 추가
, 코드가 가야 할 파일은 다음과 같습니다
이app/design/frontend/base/default/template/email/order/items/invoice/default.phtml
대신 기본/기본, 당신은 분명 사용자 지정 테마의 위치에 넣을 수 있습니다.
매력처럼 작동합니다. 하산 알리 감사합니다. – Robert
제발 좀 알려주세요. 어쨌든 이것을 거래 전자 메일에 넣으려고합니까? {{var items_productSerialDescription}}과 (와) 비슷한가요? – Robert
다음을 읽으십시오 : https://www.yireo.com/tutorials/magento/magento-theming/1670-customizing-magento-email-templates 여기 초 국가적 이메일을위한 해결책이 있습니다. –