Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

hide percentage when no discount
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: hide percentage when no discount

hide percentage when no discount 2 years, 8 months ago #38463

Hello

I would like to obscure the discount when the discount does not exist.
What should I do in SJ Listing Tabs for VirtueMart?

tks
daniela

Re: hide percentage when no discount 2 years, 8 months ago #38495

Dear PRISCO

Please go to \templates\sj_market\html\mod_sj_vm_listing_tabs\default_items.php and find:

<?php if($params->get('item_percentage_discount_display',1) == 1){
echo '<div class="box-label">';
$percent = (int)(((((int)$item->prices['product_price'] - (int)$item->prices['salesPrice']))/$item->prices['product_price'])*100);
echo '<span class="label-product label-sale">-'.$percent . '%</span>';
echo '</div>';
} ?>

=> change to:

<?php if($params->get('item_percentage_discount_display',1) == 1){
$percent = (int)(((((int)$item->prices['product_price'] - (int)$item->prices['salesPrice']))/$item->prices['product_price'])*100);
if( $percent > 0){
echo '<div class="box-label">';

echo '<span class="label-product label-sale">-'.$percent . '%</span>';
echo '</div>';
}
} ?>

thanks
  • Page:
  • 1
Time to create page: 0.49 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Suggested Posts

(/)
Result not found!

Black Friday Sale

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes