Add Price to front page

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Feb 28, 2014 10:33 am
Reply with quote
Report this post
Hello,

it seems to be an obvious question, but really I don't know the answer of it, how to add price in the front end up or beside the product details, like shown in pic?

Thanks
Amr Aly
User avatar
Fresh Boarder

teitbite
Sun Mar 02, 2014 9:07 pm
Reply with quote
Report this post
Hi

Please check if prices are enabled in VM settings and if it's not attached to some not default groups. Also show me Your site so I'll check in code if there is no problem there.
User avatar
Moderator

GK User
Mon Mar 10, 2014 9:09 am
Reply with quote
Report this post
Thanks really, I sent you my login details in a private message.

sry about delay.

Regards
Amr Aly
User avatar
Fresh Boarder

teitbite
Mon Mar 10, 2014 9:33 pm
Reply with quote
Report this post
Hi

I'm sorry, but I could not found the page where You have made this screen. Can You please tell me the url so I'll check? Send me also an access to ftp, do I'll change it directly in template override.
User avatar
Moderator

GK User
Tue Mar 11, 2014 1:24 am
Reply with quote
Report this post
ok, sure
in your pm everything.

Thanks
User avatar
Fresh Boarder

teitbite
Tue Mar 11, 2014 8:04 pm
Reply with quote
Report this post
Hi

Now the FTP access You've send me is not working :( Please try edit /html/com_virtuemart/category/default.php find code like:

Code: Select all
               <div class="catProductPrice" id="productPrice<?php echo $product->virtuemart_product_id ?>">
               <?php
                  if ($this->show_prices == '1') {
                     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);
                  } ?>
               </div>


and change it to:

Code: Select all
               <div class="catProductPrice" id="productPrice<?php echo $product->virtuemart_product_id ?>">
               <?php
                     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);
               </div>


if this will not work, try this one:

Code: Select all
               <div class="catProductPrice" id="productPrice<?php echo $product->virtuemart_product_id ?>">
               <?php
                     echo $this->currency->createPriceDiv('salesPrice', '', $product->prices);
               </div>


It's guessing but I hope one of this answers will work.
User avatar
Moderator

GK User
Wed Mar 12, 2014 9:51 am
Reply with quote
Report this post
I got this error at the 1st code
Parse error: syntax error, unexpected '<' in /home/ma7alakc/public_html/templates/gk_instyle/html/com_virtuemart/category/default.php on line 199

and this for the 2nd one

Parse error: syntax error, unexpected '<' in /home/ma7alakc/public_html/templates/gk_instyle/html/com_virtuemart/category/default.php on line 195
User avatar
Fresh Boarder

GK User
Wed Mar 12, 2014 9:55 am
Reply with quote
Report this post
I just checked the ftp details I already sent u, and its working with me
User avatar
Fresh Boarder

teitbite
Thu Mar 13, 2014 11:06 am
Reply with quote
Report this post
Hi

I have just checked again and it's still not working, attaching a screenshot as proof.]

Anyway, here is a link to the similar thread and solution looks to be working there: https://www.gavick.com/forums/viewtopic ... 39&t=34047
User avatar
Moderator


cron