News:

Looking for documentation? Take a look on our wiki

Main Menu

How do I fix the goofy pricing display issues?

Started by daviator, March 26, 2012, 18:26:59 PM

Previous topic - Next topic

daviator

I have scoured this board but have yet to find a way to get the price of an item to display correctly in both the Detail Page and in the Shopping Cart. How do I stop the price from showing as blank on the detail page and as $0.00 in the shopping cart? Is this a bug, a setting or a European thing due the VAT or something else?  it's very confusing.

What I see on the Product Detail page:
Price:
Sales price: $29.95

What I should see on the Product detail page
Price: $29.00

What I see in my cart:

   
      
      
      
SKU Qty Product NamePrice TaxDiscountTotal
S6191My Product$0.00$0.00$0.00$29.95
$29.95
What I should see in my cart:

   
      
      
SKU Qty Product NamePrice TaxDiscountTotal
S6191My Product$29.95$0.00$0.00$29.95

It would be nice if someone could at least say "It's broken and we're working on it." or "Here is how you work around it" or "Here is where you can find the offending code to fix it yourself."


Zoekool

You are very right.  :-\

How is this for confusing.

Oatmeal, Milk and Honey

Base price with tax: $1.07
Sales price: $1.07
Sales price without tax: $1.00
Tax amount: $0.07

?????? Why can't it be

Price: $1.00
Tax amount: $0.07
Total price: $1.07


Can someone let us know how to set this up correctly please.

Thank you in advance.

Joe


daviator

I guess the answer is that it is simply broken and unless we want to learn PHP and fix it ourselves, we need to move on to a different option.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

daviator

I'm on 2.0.2 which Virtuemart says is the latest version (even after a refresh).

jenkinhill

#5
Pricing was working OK for me with VM2.0.2 on J2.5.3 and I used those versions to build a working site for one of my client's intranet - now I am using the 2.0.3 versions and until  2.0.3G it was OK, but now due to some users requesting a change it does not work properly in my testing. The current version H seems OK and the latest in SVN is much better.

From looking at several reports I have found that there are some issues related to people using older PHP 5.2 versions. VM2 really needs PHP5.3+ - as does Joomla 2.5
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

daviator

How on Earth do you get the price to line up next to the word Price and not below it next to Sales Price?

Zoekool

So there is no answer for this? I can't believe that something so sophisticated as VM can't simply have the cost, the taxes and the total....  >:(

Zoekool

Quote from: jenkinhill on March 28, 2012, 23:31:58 PM
Pricing was working OK for me with VM2.0.2 on J2.5.3 and I used those versions to build a working site for one of my client's intranet - now I am using the 2.0.3 versions and until  2.0.3G it was OK, but now due to some users requesting a change it does not work properly in my testing. The current version H seems OK and the latest in SVN is much better.

From looking at several reports I have found that there are some issues related to people using older PHP 5.2 versions. VM2 really needs PHP5.3+ - as does Joomla 2.5

I'm using V2.0.2 I don't think it is a problem with the PHP as the program is working. It is just displaying the information rather oddly.

Here is how it is being displayed.

Price:
Base price with tax: $1.07
Sales price: $1.07
Sales price without tax: $1.00
Tax amount: $0.07

Why can't it simply have.

Price:
Cost: $1.00
Tax amount: $0.07
Total: $1.07

Take a look here for an example. http://yorkriversoap.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&virtuemart_category_id=1

Thank you in advance






John2400

Hi tZoekool,

There has been much discussion in forums about the display of prices.  The new 2.0.4 ( beta version) which you will be able to update to soon as a stable version settled on
a display for a variety of reasons.
* The cost you see in the back end is seen by some as the actual cost to the seller - so it might not be best to display this so them as it will show your profit.

* the new formula - which you are not using was designed so that the seller could set a final price - that is rounded eg :   the final price for you at present is 1.07 cents - not really the best display . 
What it allow you to do is set the price at 1.00 say and tell the computer that your tax in 10 % -- so then in the backend it tells "you" your cost price.  That then allows you to adjust your final price so that it does not look an odd price. like a $1.07.

* You will have to update  to see what this option looks like.
* just as an example some were commenting that they did not want their employees to know how much a product cost them so they were telling their staff to set a final price and the computer was telling them in backwards calculations the cost example. Then the owners were changing the final price to make a profit - with out their employees knowing how much an item really cost them. - this is just an exaple of how the different calculations happened to change.

Bruce Morgan

I agree with Zoekool and no one really answered his last post.  While it may be a great advantage to be able to define prices in multitude of ways, I think most users will simply want what zoekool suggested.  Is this possible with 2.0.4?

Studio 42

You can add an override file in your website
the name are
ROOTJOOMLA/language/overrides/en-GB.override.ini
And put the correction you want for your site.
Because it's always loaded at end, joomla use this file instead and replace found keys.

To find the right key look in the ROOTJOOMLA\language\en-GB\en-GB.com_virtuemart.ini

PRO

views/productdetails/tmpl/default_showprices.php

HERE is the pricing layout for the product page.

<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
    <?php
    if ($this->product->product_unit && VmConfig::get('price_show_packaging_pricelabel')) {
   echo "<strong>" . JText::_('COM_VIRTUEMART_CART_PRICE_PER_UNIT') . ' (' . $this->product->product_unit . "):</strong>";
    } else {
   echo "<strong>" . JText::_('COM_VIRTUEMART_CART_PRICE') . "</strong>";
    }

    if (empty($this->product->prices) and VmConfig::get('askprice', 1)) {
   ?>
        <a class="ask-a-question bold" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
    <?php
    }
    if ($this->showBasePrice) {
   echo $this->currency->createPriceDiv('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
   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);
    echo $this->currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices);
    echo $this->currency->createPriceDiv('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE', $this->product->prices);
    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);
    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);
    ?>
</div>

To remove the

Price: Label that's in the picture below.

remove this

else {
   echo "<strong>" . JText::_('COM_VIRTUEMART_CART_PRICE') . "</strong>";
    }



ALL of these here

    echo $this->currency->createPriceDiv('variantModification', 'COM_VIRTUEMART_PRODUCT_VARIANT_MOD', $this->product->prices);
    echo $this->currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices);
    echo $this->currency->createPriceDiv('discountedPriceWithoutTax', 'COM_VIRTUEMART_PRODUCT_DISCOUNTED_PRICE', $this->product->prices);
    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);
    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);

CAN be changed to the order you want them to be.

OR, you could even remove the ones you wont ever use.



THIS is all I have in mine

<div class="product-price" id="productPrice<?php echo $this->product->virtuemart_product_id ?>">
    <?php echo $this->currency->createPriceDiv('priceWithoutTax', 'COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX', $this->product->prices); ?>
</div>

[attachment cleanup by admin]

PRO

Quote from: daviator on March 26, 2012, 18:26:59 PM


What I see in my cart:

   
      
      
      
SKU Qty Product NamePrice TaxDiscountTotal
S6191My Product$0.00$0.00$0.00$29.95
$29.95
What I should see in my cart:

   
      
      
SKU Qty Product NamePrice TaxDiscountTotal
S6191My Product$29.95$0.00$0.00$29.95

It would be nice if someone could at least say "It's broken and we're working on it." or "Here is how you work around it" or "Here is where you can find the offending code to fix it yourself."



Deviator., as far as the
0.00   , what is your price configuration? and how do you set your product pricing?


daviator

I tried all sorts of configurations but none worked. It doesn't matter now as I've switched to a different e-commerce app that is up and running and my client is very happy now.