Add price without discount on details page

GK User
Thu Jan 03, 2013 1:09 am
Hello. I would like to add as you can see on the image, the price of an item without discount just on the right of the final price with the same size. Maybe by css styling i would like to add a overline or a red cross to this price. This way customers can see clearly the discount amount.

Is there any way to do it? We have to show again the "base price" aside the sales price.

the site is http://www.comprarenunsexshop.com

Thanks

discount.jpg
User avatar
Junior Boarder

teitbite
Thu Jan 03, 2013 3:11 am
Hi

I will need an access to ftp in order to display this second price. Please send it to my PM or mail.
User avatar
Moderator

GK User
Fri Jan 04, 2013 12:00 pm
PM sent with FTP credentials

Please, be advised i can not write the full url of the original message on the subject of the private message. Seems the url is too long to write it on the topic
User avatar
Junior Boarder

teitbite
Sat Jan 05, 2013 2:11 am
Hi

I canot log into ftp. Got this messag instead:
User avatar
Moderator

GK User
Sat Jan 05, 2013 2:04 pm
Did you try the port number 24 as I wrote you on the PM?

I've tried again it right now and worked fine.
User avatar
Junior Boarder

teitbite
Sun Jan 06, 2013 12:42 am
Hi

Yes You are right. I've missed port information.

Ok. I've found a file where it has to be modified (more like added new code for the whole price thing, becuase there are VM functions used and none can do that).
Please just tell me the exact url to the product with discount, so I'll be able to work on that.
User avatar
Moderator

GK User
Sun Jan 06, 2013 11:17 pm
Dear teibite, thanks fot your help. Is this url you can find a product with discounted price.

Original price: 12,55€
final price: 0€
Discount amount 12,55€

http://www.comprarenunsexshop.com/compo ... nunsexshop

Thanks
User avatar
Junior Boarder

teitbite
Tue Jan 08, 2013 7:21 pm
Hi

I was trying to make this modification, but I think my ftp user permissiona are not allowed me to make changes. Which is strange, because I remember making a dump before. Can You please check it ?
User avatar
Moderator

GK User
Wed Jan 09, 2013 12:15 pm
I've set the folder " gk_esport" and all the subfolders and files writteable.

Now it should run, I've tested it with your FTP user.

Thanks
User avatar
Junior Boarder

teitbite
Wed Jan 09, 2013 4:41 pm
Hi

Now it works :)

I have added this simple code to /html/com_virtuemart/productdetails/default.php in line 174

Code: Select all
            <?php
            if( $this->product->prices['discountAmount'] != 0 ) :
               echo $this->currency->createPriceDiv ( 'basePriceWithTax', '', $this->product->prices );
            endif;
            ?>


and this to override.css:

Code: Select all
.PricebasePriceWithTax {
    color: red;
    float: right;
    font-size: 18px;
    margin-right: 40px;
    margin-top: -63px;
    text-decoration: line-through;
}


please enable using overrife in template settings on order to see the styling.
User avatar
Moderator

GK User
Wed Jan 09, 2013 7:45 pm
Dear Teitbite, thanks for your help!

After activate the override css the webpage appeared this way:

Captura1.JPG


After changing a little bit your code and the CSS, finally the website is showing as desired

Captura2.JPG


I'm very thankful for your help. Please, understand I have some very basic php and CSS knowledge.
Again, Thanks!!
User avatar
Junior Boarder

teitbite
Thu Jan 10, 2013 4:13 pm
Hi

But it's looking good. Please paste this code You've made just in case someone elese will need it.
User avatar
Moderator


cron