브랜드 속성을 제품에 추가 한 다음 해당 속성으로 브랜드를 가져와야합니다 (예 :
<?php
/* Add Brand attribute to the product */
add_filter('dfrpswc_product_attributes', 'mycode_add_brand_attribute', 20, 5);
function mycode_add_brand_attribute($attributes, $post, $product, $set, $action) {
if (isset($product['brand'])) {
$attr = 'Brand';
if (!isset($attributes[sanitize_title($attr)])) {
$attributes[$attr]['name'] = $attr;
}
}
return $attributes;
}
/**
* Set value for "Brand" attribute.
*/
add_filter('dfrpswc_filter_attribute_value', 'mycode_set_brand_attribute_value', 30, 6);
function mycode_set_brand_attribute_value($value, $attribute, $post, $product, $set, $action) {
if (isset($product['brand'])) {
$attr = 'Brand';
if ($attribute == $attr) {
$value = $product['brand'];
}
}
return $value;
}
플러그인 작성자에게 문의하십시오. – Sam
고마워 라파엘, 나는 당신이 내가 미국에서 새롭다는 것을 알기를 원한다. 나는 몇 달 전에 이사했다. 나는 영어를 배우고있다. 사실 나는 프랑스어로 말하고, 나는 실수를한다. 정말 도움이된다. – ryan