Author Topic: createPriceDiv and associated text  (Read 4246 times)

Martyn Batten

  • Jr. Member
  • **
  • Posts: 144
createPriceDiv and associated text
« on: August 01, 2013, 12:30:24 pm »
In all the templates I have used, I still cannot work out how to display the price without createPriceDiv, yet maintain the currency settings. Probably a simple process  (wood and trees come to mind). Can anyone help?

Two scenarios

1. I don't want to use Div tags so the code

echo $this->currency->createPriceDiv ('priceWithoutTax', 'Offer Price: ', $this->product->prices);

is no use to me, what would I alter to remove div tags?

2. I want text to appear after the price

echo $this->currency->createPriceDiv ('basePrice', 'without VAT: ', $this->product->prices);

unfortunately if I move the 'without VAT' to any other part of the code it won't work and if I put it in its own echo then it appears outside the div, yes I could use css to move the text around but there must be a simpler way?

Any help would be appreciated.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
Re: createPriceDiv and associated text
« Reply #1 on: August 01, 2013, 14:49:38 pm »
Interesting why do you prefer such method of displaying product price?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2915
  • VirtueMart Version: 3.6.0
Re: createPriceDiv and associated text
« Reply #2 on: August 01, 2013, 15:39:38 pm »


The funciton is within administrator/components/com_virtuemart/helpers/ currencydisplay.php

Looks like js uses the div but you can play with this of create a new function to suit your needs and adjust the display views accordingly



regards
A

Joomla 3.9.8
php 7.1

Martyn Batten

  • Jr. Member
  • **
  • Posts: 144
Re: createPriceDiv and associated text
« Reply #3 on: November 08, 2013, 12:41:34 pm »
Interesting why do you prefer such method of displaying product price?
Because that's the way the customer wants it displayed, this is supposed to be a forum for help not a critique on how and why something is required...