showing price in category layout

Professional eCommerce VirtueMart Joomla template with responsive design discussion forum.
Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Wed Jan 22, 2014 12:19 pm
Reply with quote
Report this post
How to show original price and after discounted price in category layout?
Now my temporary site only can see the original price. I would like to see both price showing out in category layout.
and the original price will showing a strikethrough.

My temporary site:
http://samhoikl.com/janieandjoe/brands/ ... kid-galaxy
User avatar
Senior Boarder

teitbite
Sat Jan 25, 2014 1:42 pm
Reply with quote
Report this post
Hi

This requires changes to php files. Please send me an access to FTP, so I'll make it for you and publish the changes done here.
User avatar
Moderator

GK User
Thu Feb 06, 2014 6:59 am
Reply with quote
Report this post
Hi Teitbite,

I have sent you FTP details to your [email protected].
I am looking forward to hearing from you soon.

Thank you very much.
User avatar
Senior Boarder

teitbite
Fri Feb 07, 2014 10:32 am
Reply with quote
Report this post
Hi

I got an access to FTP, but none of my changes works. I think cache is enabled in joomla configuration or in server. Please send me an access to joomla panel so I'll check and disable it.
User avatar
Moderator

GK User
Thu Feb 13, 2014 9:39 am
Reply with quote
Report this post
I have sent you the super admin login.

Thank you.
User avatar
Senior Boarder

teitbite
Sun Feb 16, 2014 10:31 pm
Reply with quote
Report this post
Hi

I've added this code to /html/com_virtuemart/category/default.php, looks to be working ok.

Code: Select all
                  <?php if( $product->prices['discountedPriceWithoutTax'] ):  ?>
                     <span style="text-decoration: line-through;"><?php echo 'RM ' . round( $product->prices['discountedPriceWithoutTax'], 2 ); ?></span>
                  <?php endif; ?>
User avatar
Moderator

GK User
Mon Feb 17, 2014 8:14 am
Reply with quote
Report this post
Thank you for your help.

Btw, the display is the other way round. The original price will showing a strikethrough, not the discount price.
Could you please tell me how to change this?

Thanks.
User avatar
Senior Boarder

teitbite
Wed Feb 19, 2014 6:12 pm
Reply with quote
Report this post
Hi

Sorry for that. Now should be fine with this code:

Code: Select all
               <?php
                  if ($this->show_prices == '1') {
                     if( $product->prices['discountedPriceWithoutTax'] ):
                        echo '<span style="text-decoration: line-through;">' . $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices) . '</span>'
                        . 'RM ' . round( (int)$product->prices['discountedPriceWithoutTax'], 2 );
                     else:
                        if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
                           echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                        }
                        echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
                        echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
                     endif;
                  } ?>
User avatar
Moderator

GK User
Mon Feb 24, 2014 8:16 am
Reply with quote
Report this post
Yes, this is what I want. You are super helpful.
Thank you so much.
User avatar
Senior Boarder

GK User
Fri Jul 15, 2016 6:05 am
Reply with quote
Report this post
Hi Teitbite,
teitbite wrote:Hi

Sorry for that. Now should be fine with this code:

Code: Select all
               <?php
                  if ($this->show_prices == '1') {
                     if( $product->prices['discountedPriceWithoutTax'] ):
                        echo '<span style="text-decoration: line-through;">' . $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices) . '</span>'
                        . 'RM ' . round( (int)$product->prices['discountedPriceWithoutTax'], 2 );
                     else:
                        if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
                           echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                        }
                        echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
                        echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
                     endif;
                  } ?>


What Line do I add this in the templates/gk_instyle/html/com_virtuemart/category/default.php ? Just at the end, after Line 52?
User avatar
Senior Boarder

teitbite
Tue Jul 19, 2016 6:02 pm
Reply with quote
Report this post
Hi

This is a very old thread. I'm afraid a lot has changed in code. Please send me an access to ftp and an url to the page where I'll be able to see both prices.
User avatar
Moderator

GK User
Fri Sep 23, 2016 3:10 am
Reply with quote
Report this post
Hi, sorry this has taken a while, got busy doing other things...

website www.ebonyoutlet.co.nz
I will personal message you FTP info.

Thanks!
User avatar
Senior Boarder

teitbite
Mon Sep 26, 2016 1:04 pm
Reply with quote
Report this post
Hi

You have some kind of cache on Your site. Every change I do to code is visible after 10min on Your site. It's hard to work like that, can You please disable it first ?
User avatar
Moderator

GK User
Mon Sep 26, 2016 9:08 pm
Reply with quote
Report this post
Hi teitbite.

Yes, just standard Joomla cache. I have disabled now.
User avatar
Senior Boarder

teitbite
Thu Sep 29, 2016 4:42 pm
Reply with quote
Report this post
Hi

No, it's something else. I've added this "TUTAJTAM" to test if I'm in right place, than removed it from code. After 30min "TUTAJTAM" is still showing even if it's not in code any more.

Also I think You have not all prices activated in VM configuration. When I try to display price "discountedPriceWithoutTax" all I got is an empty space.
User avatar
Moderator

GK User
Thu Sep 29, 2016 9:47 pm
Reply with quote
Report this post
Thanks,
The price fields I have activated are "Baseprice with tax, but without discounts" & "Final sales price"
In NZ we don't have to show a excluding tax price, only an including GST price (Final Sales Price)

I have no idea what the other Cache could be, I just used your Quickstart package. I have just tried within Joomla Admin and have the same issue even though I have Cache set to off.

Plus my live site now looks like this
Untitled-1.jpg
:lol:
Can I get this fixed?
User avatar
Senior Boarder

teitbite
Sun Oct 02, 2016 10:42 am
Reply with quote
Report this post
Hi

That's exactly what I'm talking about. I've asked in code to display this informations (You see in screenshot). Was waiting to see it and checking every 10min, after 1h I still was not able to see it, so I wrote to You than to disable this cache. Now You see it was shown after no idea how much time. If it's not a joomla cache than it has to be server cache, ask You're hosting provider to disable it. It's not possible to work with code while it's enabled.

I've removed my code from this file now, so You can make site online.
User avatar
Moderator

GK User
Sun Oct 02, 2016 11:33 am
Reply with quote
Report this post
Thanks, will do some research and get back to you once I have sorted.
User avatar
Senior Boarder

teitbite
Mon Oct 03, 2016 5:41 pm
Reply with quote
Report this post
Hi

Ok. I'll wait than. Let me know when it'll be possible to work.
User avatar
Moderator

GK User
Tue Oct 04, 2016 6:41 am
Reply with quote
Report this post
Hi teitbite,

disabled plugins- system - GK Cache and system - page cache.
Seem to have fixed the issue.
User avatar
Senior Boarder

teitbite
Wed Oct 05, 2016 1:23 pm
Reply with quote
Report this post
Hi

Great :) I should have asked for a joomla panel to disable it myself ;/

Had no problem to add this code this time. I've added to file /html/com_virtuemart/category/default.php

Code: Select all
<?php
                  if ($this->show_prices == '1') {
                     if( $product->prices['discountedPriceWithoutTax'] ):
                        echo '<span class="line-through">' . $this->currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_OLDPRICE', $product->prices) . '</span><br />';
                        echo $this->currency->createPriceDiv('salesPrice','COM_VIRTUEMART_PRODUCT_NEWPRICE',$product->prices);
                     else:
                        if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
                           echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                        }
                        echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
                        echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
                     endif;
} ?>


Texts like: "Old Price:", "Current price:" can be found in /language/override/en-GB.override.ini
User avatar
Moderator

GK User
Wed Oct 05, 2016 9:20 pm
Reply with quote
Report this post
Awesome, looks great thanks Teitbite.

Love your work, and if your ever in NZ I'll buy you many drinks! :woohoo:
User avatar
Senior Boarder

teitbite
Fri Oct 07, 2016 10:01 am
Reply with quote
Report this post
Hi

Thank You :)
Sorry it took so long.
User avatar
Moderator

GK User
Mon Oct 17, 2016 5:13 pm
Reply with quote
Report this post
hello. I did add the code:
Code: Select all
if ($this->show_prices == '1') {
                     if( $product->prices['discountedPriceWithoutTax'] ):
                        echo '<span class="line-through">' . $this->currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_OLDPRICE', $product->prices) . '</span><br />';
                        echo $this->currency->createPriceDiv('salesPrice','COM_VIRTUEMART_PRODUCT_NEWPRICE',$product->prices);
                     else:
                        if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and  !$product->images[0]->file_is_downloadable) {
                           echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE');
                        }
                        echo $this->currency->createPriceDiv('basePriceWithTax', '', $product->prices);
                        echo $this->currency->createPriceDiv('taxAmount','TPL_GK_LANG_VM_INC_TAX', $product->prices);
                     endif;
} ?>


at line 57 and the plugin system - gk chae is disabled but the price its not showing :(
User avatar
Fresh Boarder

teitbite
Thu Oct 20, 2016 2:20 pm
Reply with quote
Report this post
Hi

Please send me an url, access to joomla panel and ftp. I'll check.
User avatar
Moderator

GK User
Fri Oct 28, 2016 5:25 pm
Reply with quote
Report this post
Hi,

I tried to show prices with the last code you posted, but nothing is displayed. I do not know if I'm not typing it in the correct line or template has been updated and that code is no longer valid.

Thanks in advance!
User avatar
Fresh Boarder

teitbite
Tue Nov 01, 2016 11:17 am
Reply with quote
Report this post
Hi

I've copied this code from latest copy of a quickstart of this template, so it should work. Tell me the url to a page where You want it and access to ftp.
User avatar
Moderator

GK User
Wed Nov 02, 2016 10:16 am
Reply with quote
Report this post
Hi,
I have sent what you told me. I'm looking forward to your response.
User avatar
Fresh Boarder

teitbite
Fri Nov 04, 2016 2:53 pm
Reply with quote
Report this post
Hi

Please check user permissions on this ftp account You've send me. When I log in I cannot see any files.
User avatar
Moderator

teitbite
Sat Nov 05, 2016 8:56 am
Reply with quote
Report this post
Hi

I'm not sure which one of You is Ricardo who mailed me details about this case, but neither joomla or ftp access isn't working.
User avatar
Moderator

GK User
Wed Nov 09, 2016 12:04 pm
Reply with quote
Report this post
teitbite wrote:Hi

Please check user permissions on this ftp account You've send me. When I log in I cannot see any files.


Sorry, it was a failure when selecting the directory, the ftp should already work
User avatar
Fresh Boarder

teitbite
Mon Nov 14, 2016 6:32 pm
Reply with quote
Report this post
Hi

I'm afraid I cannot find Your message with access anymore. I only have to some other website, so please try replace file /html/com_virtuemart/category/default.php with the one attached. If this will not work please send me an access one more time.
User avatar
Moderator

GK User
Tue Nov 15, 2016 11:18 am
Reply with quote
Report this post
It worked, thank you very much!!
User avatar
Fresh Boarder

teitbite
Fri Nov 18, 2016 3:05 pm
Reply with quote
Report this post
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.