Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Joomla Virtuemart Template - DarkMart (SKU# FLEX-00011)

TOPIC: Show only percentage discount

Show only percentage discount 10 years 6 months ago #6853

Hello,
i'm using your darkmart template, and i want to know if it is possibile to have just the percentage discount amount in my Shop and not also the money save?

I have another question about discount.. why in the category view (www.romanasirshop.it/index.php/collezionedonna/abbigliamento-donna/t-shirts?start=9) i see the percentage discount and the the money discount but when i enter inside the flypage (www.romanasirshop.it/index.php/collezionedonna/abbigliamento-donna/t-shirts/t-shirt-tee-trend-pazza-idea-detail) i see just the money discount?

Thanks in advance for help


Attachment Schermata-2013-10-16-a-15.13.56.png not found

The topic has been locked.

Show only percentage discount 10 years 6 months ago #6862

Hi,

What you are asking is a custom modification (not the second one, which is a bug... but the first one). But i am going to provide you a solution to solve your first inquiry as well.

Lets solve the 2. problem first, which looks like a bug of DarkMart.
Open this PHP file:
/templates/flexible_darkmart/html/com_virtuemat/productdetails/default.php

and look for this line:
$("#productPrice'.$this->product->virtuemart_product_id.' div.PricediscountAmount span.PricediscountAmount").append("<span class='.'FlexiblePercentage'.'> ('.$percentage.'%)</span>");

and replace it with this:
$("#productPrice'.$this->product->virtuemart_product_id.' div.PricediscountAmount").append("<span class='.'FlexiblePercentage'.'> ('.$percentage.'%)</span>");
THE CHANGE: remove the span.PricediscountAmount

your 2nd problem will go away.

Your 1st inquiry is little complex.

Again, within the same PHP file:
/templates/flexible_darkmart/html/com_virtuemat/productdetails/default.php

and within the same line
$("#productPrice'.$this->product->virtuemart_product_id.' div.PricediscountAmount span.PricediscountAmount").append("<span class='.'FlexiblePercentage'.'> ('.$percentage.'%)</span>");

but this time replace it with this:
$("#productPrice'.$this->product->virtuemart_product_id.' div.PricediscountAmount").parent().append("<span class='.'FlexiblePercentage'.'> ('.$percentage.'%)</span>");
THE CHANGE: add .parent() - instead of copy-pasting from here, i suggest you to make the modification by adding the .parent()

(do the same code changes in the category browse page as well - /templates/flexible_darkmart/html/com_virtuemat/categort/default.php, I mean; remove span.PricediscountAmount and add .parent())

now open this CSS file:
/templates/flexible_darkmart/css/virtuemart.css

Add these CSS rule:
.PricediscountAmount {
	display:none !important;
}
.FlexiblePercentage {
	color: #ff6d6d;
	font-size: 12px;
}

And you will get this look:

Attachment ScreenShot2013-10-17at4.52.48AM.png not found




Regards,
Support & Development
Last Edit: 10 years 6 months ago by Support.
The topic has been locked.

Show only percentage discount 10 years 5 months ago #6920

Great, now it works.

Thanks
The topic has been locked.

Show only percentage discount 10 years 5 months ago #6945

Hi, I am glad it works out as expected in your website.

I hope this topic will help to others who would like to have the same thing.

Case solved. Topic closed.

Regards,
Support
The topic has been locked.
Time to create page: 0.194 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo