Hello people
I am running J2.5 and VM2.0.24c
I am trying to get the http://dynamicconverter.com/ (http://dynamicconverter.com/) work, i contacted the support and they said:
QuoteDynamic converter needs to see the currency symbol next to the digits to associate the digits as currency.
>
> Your currency symbol is the letter R, and I see that you have added that as the special currency symbol, Awesome.
>
> However here is the issue: Your price html block looks like this <div
> style="display : block;" class="PricebasePrice">Base price: <span
> class="PricebasePrice"><span class="caps">R<span
> class="numbers">201</span></span>.<span
> class="numbers">99</span></span></div>
>
> So in essence DC detect 201 but cant see the R so ignores that then it
> detects 99 and again can't see the R symbol. So effectively your
> prices are like
> | R | 201 | . | 99 | where | represents a separate block that dc scans.
>
> Solution:
> You need to move the prices in together like so | R 201.99 | This means DC would detect 201.99 and since it can see R next to it, it will assume this number as a currency value.
>
> So the Html needs to be like
> <div style="display : block;" class="PricebasePrice">Base price: <span
> class="PricebasePrice"> R 201.99</span></div>
Now my question is how do i change it?
Friendly bump... ;D
Totally depends where and how your producing your
<div> style="display : block;" class="PricebasePrice">Base price:
<span > class="PricebasePrice"><span class="caps">R<span> class="numbers">201</span></span>.<span> class="numbers">99</span></span></div>
P:S the html from the paste is simply wrong
i have checked the VM files com_virtuemart/views/cart/tmpl/default.php and can find some references to the PricebasePrice but cannot for the life of me find that HTML.
You still haven't explained where you are producing or needing or seeing this html ??? How can anyone help with this complete lack of info?
all prices are available in the templates
echo out the $product object
e.g. in components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
print 'Debug Line '.__LINE__.' $this->product->prices <pre>'; print_r ($this->product->prices); print "</pre><br />\n";
gives
Debug Line 20 $this->product->prices
Array
(
[costPrice] => 100.00000
[basePrice] => 16.16458322
[basePriceVariant] => 16.16458322
[basePriceWithTax] => 0
[discountedPriceWithoutTax] => 16.16458322
[priceBeforeTax] => 16.16458322
[salesPrice] => 16.16458322
[taxAmount] => 0
[salesPriceWithDiscount] => 0
[salesPriceTemp] => 16.16458322
[unitPrice] => 0
[discountAmount] => -0
[priceWithoutTax] => 16.16458322
[variantModification] => 0
[DBTax] => Array
(
)
[Tax] => Array
(
)
[VatTax] => Array
(
)
[DATax] => Array
(
)
)
HI GJC
It is being produced on all the product prices through out the shop.
I basically want the converter to convert the currency when the user selects it from the drop down, without the user having to select the change currency button.
The native VM converter module doesn't do that so i found an alternative but now this issue is stopping it from working.
The shop is not 'live' but is behind a link that admin can access, i am willing to give login info if that might help?
Thanks
just create your own price div.. and dump all the stuff already there
something like
<div id="PricebasePrice" >Price : R <?php echo number_format($this->product->prices['salesPrice'],2,',','.') ?></div>
in templates/YOURTEMPLATEt/html/com_virtuemart/productdetails/default_showprices.php
Are you saying that i must delete the current Div tag in default_showprices.php
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
and replace with what you posted below
Quote<div id="PricebasePrice" >Price : R <?php echo number_format($this->product->prices['salesPrice'],2,',','.') ?></div>
Sorry to be a pain like this i just want to make sure i am doing the correct thing.
Thanks
just suck and see - your code isn't original vm so I have no way of knowing
How is it not original VM code, i havent touched that file at all?
I will give it a bash and see.
Thanks
the original is
defined ('_JEXEC') or die('Restricted access');
?>
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
<?php
if (!empty($this->product->prices['salesPrice'])) {
echo "<strong>" . JText::_ ('COM_VIRTUEMART_CART_PRICE') . "</strong>";
}
//vmdebug('view productdetails layout default show prices, prices',$this->product);
if ($this->product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
?>
<a class="ask-a-question bold" href="<?php echo $this->askquestion_url ?>" rel="nofollow" ><?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
} else {
if ($this->showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['basePriceVariant'][1]) != $this->product->prices['basePriceVariant']) {
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices);
}
}
echo $this->currency->createPriceDiv ('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices);
if (round($this->product->prices['basePriceWithTax'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}
if (round($this->product->prices['salesPriceWithDiscount'],$this->currency->_priceConfig['salesPrice'][1]) != $this->product->prices['salesPrice']) {
echo $this->currency->createPriceDiv ('salesPriceWithDiscount', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT', $this->product->prices);
}
echo $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices);
if ($this->product->prices['discountedPriceWithoutTax'] != $this->product->prices['priceWithoutTax']) {
echo $this->currency->createPriceDiv ('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
} else {
echo $this->currency->createPriceDiv ('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices);
}
echo $this->currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $this->product->prices);
echo $this->currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $this->product->prices);
$unitPriceDescription = JText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', JText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$this->product->product_unit));
echo $this->currency->createPriceDiv ('unitPrice', $unitPriceDescription, $this->product->prices);
}
?>
</div>
stick
<div id="PricebasePrice" >Price : R <?php echo number_format($this->product->prices['salesPrice'],2,',','.') ?></div>
at the bottom to see if thats what u want
Hi GJC
After reading my last post again, i come off a bit blunt and for that i apologise.
Thank you for your last response, going to try it now.
cheers
So i pasted the code at the bottom of the default_showprices.php and no luck. Im starting to think i must look for yet another alternative...
if you paste the snippet directly berore the
<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
it will definitely render
R 20,00 etc
there is now reason why it wouldn't
the html will be
<div id="PricebasePrice" >Price : R 20,00</div>
Hi GJC
Its still not working, I have attached the file for you view.
If i cannot get it working by today then i give up lol.
Thanks
[attachment cleanup by admin]
Sigh..
works as I said perfectly.....
screen 1 - the file you sent
screen 2 - with all the cack removed
screen 3 - the html as 1st requested
attached with cack removed
[attachment cleanup by admin]
Shot a lot GJC, you are the man! It is displaying how it should now just wait and see if the converter works, the developer said it should take half an hour to start???
Thanks again
Quotenow just wait and see if the converter works, the developer said it should take half an hour to start???
probably need the to wait for the water to heat etc.... ;)
or waiting for the hamster to start spinning the wheel hahahaha ....
Now its just my last issue with VM and my 1 year project is complete.... i hope.
Know anything about tax display?
http://forum.virtuemart.net/index.php?topic=120626.0 (http://forum.virtuemart.net/index.php?topic=120626.0)
Quote from: GJC Web Design on December 10, 2013, 09:21:42 AM
Sigh..
works as I said perfectly.....
screen 1 - the file you sent
screen 2 - with all the cack removed
screen 3 - the html as 1st requested
attached with cack removed
Hi there GJC
Its been a while, hope you keeping well?
This damn site wont go away no matter how hard i try get rid of them. They have now pointed out that the price is displaying incorrectly in the productdetails view... (When you view the product on its own) it is displaying with the thousand separator and the currency converter doesnt work in the productdetails view which i find rather strange. I have checked the currency settings in VM and there is nothing in the text box. In the product list view the price is displaying perfectly thanks to your help a while back.
Any ideas?
Many Thanks