- Posts: 86250
- Thank you received: 14235
Show product price by different units!
9 years 4 months ago #270248
by nicolas
Replied by nicolas on topic Show product price by different units!
Hi,
You can't restrict custom fields to products and to categories are the same time. If you do. This means that the custom field will only display for the products selected if they are in these categories. So it not logical for you to do that since then you can simply select the products you want.
So in your case, you want to remove the selected products to only have categories selected in your custom field and it should work like you want.
You can't restrict custom fields to products and to categories are the same time. If you do. This means that the custom field will only display for the products selected if they are in these categories. So it not logical for you to do that since then you can simply select the products you want.
So in your case, you want to remove the selected products to only have categories selected in your custom field and it should work like you want.
Please Log in or Create an account to join the conversation.
6 years 6 months ago - 6 years 6 months ago #316691
by Formidog
Replied by Formidog on topic Show product price by different units!
Last edit: 6 years 6 months ago by Formidog.
Please Log in or Create an account to join the conversation.
6 years 6 months ago #316693
by nicolas
Replied by nicolas on topic Show product price by different units!
Hi,
In the product / listing_price.php view file, you'll fine this line:
You could change it to :
And then you can add your translation overrides like:
PER_PACK_AT_LEAST_X_BOUGHT="per pack for buying at least %s"
where you would change "per pack" and "PER_PACK" based on what you have in your salemethod custom product field.
In the product / listing_price.php view file, you'll fine this line:
Code:
echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
Code:
if(isset($this->element->main)) echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf($this->row->salemethod.'_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
elseif(isset($this->row)) echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf($this->row->salemethod.'_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
else echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf($this->row->salemethod.'_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
PER_PACK_AT_LEAST_X_BOUGHT="per pack for buying at least %s"
where you would change "per pack" and "PER_PACK" based on what you have in your salemethod custom product field.
Please Log in or Create an account to join the conversation.
Time to create page: 0.143 seconds