News:

Looking for documentation? Take a look on our wiki

Main Menu

Cannot display multiple prices

Started by spacecadet, February 10, 2014, 13:39:11 PM

Previous topic - Next topic

spacecadet

No matter what buttons i click in Configuration, it will only ever display the final correct price.

No matter how many buttons, which buttons, no matter what I do: I can only get it to display the correct final price.

I want to display the normal price and the discounted price, but I cannot do so, because it will only ever display the final price. No matter what I do.

I've been posting this question on this forum for over six months in thread after thread. I cannot find a solution.

My joomla and virtuemart versions are up to date.

I am using the MoSoWeb vm template.

If anyone can offer any suggestion, I would be grateful.

Thank you.

jenkinhill

Assuming that you have all options selected in Config/Pricing then the actual display of those prices is down to the Mosoweb template overrides. Just try switching to the Beez template & the prices should display as then you won't be using overrides. You should ask Eugen at Mosoweb for support on this issue, or possibly edit the override file for default_showprices.php (and others).  http://forum.virtuemart.net/index.php?topic=108212.0
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

spacecadet

Thanks for your reply. It is not template related. I have asked Eugen at MoSoWeb about this.

He has reported that the template is not the issue and that it happens regardless of whether the template is on or off.

He has checked all my settings and tells me I have everything correct.

He suspects it is due to a conflict somewhere with a plug-in.

I am slowly working through the plug-ins to determine which one might be the offending culprit

meanwhile, after changes were made to diagnose this yesterday, the main megamenu on my site no longer drops down....so that only the top item in each drop down menu list is available......i can't see how to restore the functionality of that menu.....

any suggestions?

as to the multiple prices issue, i guess i just have a problem which no one has ever encountered before, which comes down to an unprecedented combination of plugins that no one has ever combine before.

if anyone is reading this who has had this problem and found the solution, please let me know.

any other clues also much appreciated. thanks.

spacecadet

#3
ok. so since June last year I've been trying to get prices to display showing discount. like this

shampoo $34
shampoo discount $30





thanks.

mowlman

In order for me to show base price with strikethrough and then also show final price, I had to create a zero default tax rule. Then within the product, I could set an override(sale) price.
Also within VM Config, make sure to have price check boxes checked.
See attached images.



[attachment cleanup by admin]

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

spacecadet

thank you very much for posting

but it still makes no difference. it displays the final, discounted price, but it will not display the "Base Price With Tax".

The price display tab in the Configuration section is doing nothing at all.....nothing at all....nothing at all....

no matter what i select, it refuses to display any prices whatsoever, except the final correct discounted price.

there MUST be a way to diagnose this. right? how can i track back from the display back to the configuration settings?

any clues would be much appreciated here.






jenkinhill

To show base price with tax you must have this in your productdetails/default_showprices.php    template:

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>";
   }

This is the first thing to check in tracing this back. I presume that you are using an override for default_showprices.php so that is the file you must check.
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

Milbo

Quote from: spacecadet on March 04, 2014, 09:39:31 AM
ok. so since June last year I've been trying to get prices to display showing discount. like this

shampoo $34
shampoo discount $30

You can use the technic with the override price option, or adjust the layout of the template. An override, not a big deal. It is just a matter of taste if you want to display the price stroken, or not. It is in fact just a matter of the css. You can do it with override or css.

Quote from: spacecadet on March 04, 2014, 09:39:31 AM
nearly 10 months. countless hours. large chunks of sanity. and no result so far.

its really shot my confidence in open source because i realise that when you get stuck in a problem like this, there is basically nothing you can do.

Really? I can tell you countless errors and bugs in payed/closed software software, there you cant do anything about it. Open source software is open so you can change it, or find someone doing it for you.


Quote from: spacecadet on March 04, 2014, 09:39:31 AM
except i suppose agree to pay someone an open ended amount of money to find out what is causing this crazy situation.

will you solve my problem guaranteed for $50? ok fine how about $100? pm me.
Granted! it is a typical 50 € ticket http://extensions.virtuemart.net/support/developing-for-0-5-hour-detail. Just write a ticket at http://extensions.virtuemart.net/ticket

Quote from: spacecadet on March 04, 2014, 09:39:31 AM
i will never use VM again for a joomla site. i just dont have 10 months and countless hours to spend on solving problems like this.
Maybe it was updated meanwhile? You never said which version you are using.


Quote from: spacecadet on March 04, 2014, 09:39:31 AM
i used to love the concept of Open Source, but i can see now that when things get to a certain level of complexity, it gets messy. i think virtuemart is great, in principle, but in execution, it's just too much pain.
Mijoshop is also opensource and it is just a bridge of opencart as far as I know. There you get other problems then with VM. In fact to show a stroken through price is a simple thing, I really wonder that no one was able to help you and why the heck you decided to write a post 10 months later?

and you see, Jenkinhill even donated the code, now you just need to create the overrides.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

spacecadet

#9
Dear jenkinhill and Milbo,

Thank you both very much for your replies.

I have not been using an overrive for that default_showprices.php file. But following jenkinhills advise above, I've set up the override file, added that line of code, and again it makes no difference.

thanks...

cheers

spacecadet

spacecadet

#10
Dear jenkinhill,

Thanks again for your response.

I've checked, and my default_showprices.php does contain that line you have cited.  I have cut and pasted the code as it appears in that file below.

Please note however: I am not using an override for this file. I'm going to say that again: I am not using any override, as far as I can tell, for the default_showprices.php file.

However, I am using the MoWebSo custom template. Now, I have to admit that i don't really understand how the php in that template override is working. It's not my specialty. I can follow basically what is happening, but there is something tricky about the way that the custom template is set up which is beyond my php understanding.,

But here is a clue: when I turn the template off, it still doesn't display anything but the final price, but it does display a line of code from that file, on the product display page. It displays this line:

echo "Base Price". $this->product->prices['basePrice'];

This doesn't display when I have the template turned on.

So it seems to be that somehow the template is doing something, even though there is not an explicit default_showprices.php overwrite file set up.

OK, well thats the current situation. As usual, I would very much appreciate if someone can help me to solve this vexing issue.

Here is the default_showprices.php file:

<?php
/**
*
* Show the product details page
*
* @package    VirtueMart
* @subpackage
* @author Max Milbers, Valerie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default_showprices.php 6556 2012-10-17 18:15:30Z kkmediaproduction $
*/
// Check to ensure this file is included in Joomla!
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);
   }
   ?>
   echo "Base Price". $this->product->prices['basePrice'];
</div>


StefanSTS

Did you see the offer to solve your problem for 50 Euros up there from an A team member as you say?
Maybe you didn't read it, so I just wanted to point it out again, because you said 50, 100 $ ok!

So if you see the offer and you haven't taken that offer, I get the idea, you are not really interested in the solution.

In the last ten month, did you try to find out, what basic information should be given in a forum like this to solve a problem?
Software versions, link to the site? Screenshots? Admin access to a mirrored site?

Please stop whining and get it done. Future problems and general life included.
I can't get rid of the feeling you are trying to fool people here.

For the case, I am all wrong with the stated above:
Your default_showprices.php is fine, except for the second last line, you probably filled in. Keep it as it was.
I guess that could be the the wrong file, if there is an override for that file, it is in your template folder.

But without any access to at least the site or the files via FTP, there is not a big chance to solve the problem within the next ten month.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

spacecadet

#12
thanks Stephan. all good advice, well taken.