News:

Support the VirtueMart project and become a member

Main Menu

Sale category price issue

Started by 2cool, June 20, 2017, 00:48:33 AM

Previous topic - Next topic

Jörgen

Ok I mixed your price settings.
How does it look? Very hard to guess what you are seeing as a result in product view and cart view.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

2cool

Hi Jörgen,

I've been testing all kinds of settings on local backup.
For private customers it displays right; regular price  + discount price (both incl. tax)
The B2B group doesn't show both?

Can't find any clear info on how to configure these settings for 2 shopper groups...

Hope someone can point me in the right direction.

Thanks,
Pas

K&K media production

you can't display a product price with tax if there is only a tax per bill rule

if you want something like this, you must build your own php functions to calculate such a price

2cool

Hi k&k,

There are 2 shopper groups, both have their own tax/vat settings
Every product has 2 prices, b2b and private shoppers.

private shoppers see prices with tax
b2b see prices without tax (tax per bill)

Guess this should be a pretty basic setup....

Now I need to add a sale category for both groups but can't figure out why this is so difficult to configure.

If anyone can tell me how to configure this?

Regards,
Pas

2cool

Hi there,
Did some more testing and noticed the price and discount price is displayed in cart for B2B shoppers??
Now I only need this to be displayed on products too..

See attached screens with settings.

Thanks,
Pas

2cool

Still unsolved....I did a clean install of joomla and virtuemart.
But with this setup still can't get the price settings right?

Attached details of private and b2b shoppers (product and card)
Also the product proce settings

I want b2b to show price discount the same as private price.

Hope anyone can tell me how to fix....

Regards,
Pas

2cool

Did many tests and still not able to solve this issue.
Right now I can see the regular and discount price are displayed in the cart for b2b shoppers ???

Why can't this be on product page...

Hope someone has a solution for this.
Attached the settings for b2b shopper group and product.

Regards,
Pas

K&K media production

The crossed price is the base price incl. vat tax. Your b2b products have no vat tax -> there is no price incl. vat tax.

You must modify your template. Look how the output for the b2c crossed price is done and add something for your b2b prices.

2cool

Hi thanks for your reply,

I feel stupid, why isn't this 'standard' as this (Overwrite final) is a standard option to use in product price.

And in what file should I find the b2b crossed price?
What file should be modified to show this price on product pages?

Thanks and regards,
Pas

2cool

Looking in 'prices.php' my guess is where I should add the overwrite final for b2b.
But I just don't see or know how to find this variable or add this for the b2b customers....

Hope anyone can explain if this is the right move.

Regards,
Pas


<?php
/**
 *
 * Show the product prices
 *
 * @package    VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen
 * @link ${PHING.VM.MAINTAINERURL}
 * @copyright Copyright (c) 2004 - 2014 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 8024 2014-06-12 15:08:59Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');
$product $viewData['product'];
$currency $viewData['currency'];

?>

<div class="product-price" id="productPrice<?php echo $product->virtuemart_product_id ?>">
<?php
if (!empty(
$product->prices['salesPrice'])) {
//echo '<div class="vm-cart-price">' . vmText::_ ('COM_VIRTUEMART_CART_PRICE') . '</div>';
}

if ($product->prices['salesPrice']<=and VmConfig::get ('askprice'1) and isset($product->images[0]) and !$product->images[0]->file_is_downloadable) {
$askquestion_url JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $product->virtuemart_product_id '&virtuemart_category_id=' $product->virtuemart_category_id '&tmpl=component'FALSE);
?>

<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::('COM_VIRTUEMART_PRODUCT_ASKPRICE'?></a>
<?php
} else {
//if ($showBasePrice) {
echo $currency->createPriceDiv ('basePrice''COM_VIRTUEMART_PRODUCT_BASEPRICE'$product->prices);
//if (round($product->prices['basePrice'],$currency->_priceConfig['basePriceVariant'][1]) != $product->prices['basePriceVariant']) {
echo $currency->createPriceDiv ('basePriceVariant''COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT'$product->prices);
//}

//}
echo $currency->createPriceDiv ('variantModification''COM_VIRTUEMART_PRODUCT_VARIANT_MOD'$product->prices);
if (round($product->prices['basePriceWithTax'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
echo '<span class="price-crossed" >' $currency->createPriceDiv ('basePriceWithTax''COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX'$product->prices) . "</span>";
}
if (round($product->prices['salesPriceWithDiscount'],$currency->_priceConfig['salesPrice'][1]) != round($product->prices['salesPrice'],$currency->_priceConfig['salesPrice'][1])) {
echo $currency->createPriceDiv ('salesPriceWithDiscount''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT'$product->prices);
}

echo $currency->createPriceDiv ('salesPrice''COM_VIRTUEMART_PRODUCT_SALESPRICE'$product->prices);
echo $currency->createPriceDiv ('salesPriceTt''COM_VIRTUEMART_PRODUCT_SALESPRICE_TT'$product->prices);
//echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
//echo $currency->createPriceDiv ('salesPriceQu', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);
if ($product->prices['discountedPriceWithoutTax'] != $product->prices['priceWithoutTax']) {
echo $currency->createPriceDiv ('discountedPriceWithoutTax''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX'$product->prices);
echo $currency->createPriceDiv ('discountedPriceWithoutTaxTt''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX_TT'$product->prices);
} else {
echo $currency->createPriceDiv ('priceWithoutTax''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX'$product->prices);
echo $currency->createPriceDiv ('priceWithoutTaxTt''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX_TT'$product->prices);
}
  echo 
$currency->createPriceDiv ('discountAmount''COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT'$product->prices);
echo $currency->createPriceDiv ('discountAmountTt''COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT_TT'$product->prices);
echo $currency->createPriceDiv ('taxAmount''COM_VIRTUEMART_PRODUCT_TAX_AMOUNT'$product->prices);
echo $currency->createPriceDiv ('taxAmountTt''COM_VIRTUEMART_PRODUCT_TAX_AMOUNT_TT'$product->prices);
$unitPriceDescription vmText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE'vmText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.$product->product_unit));
echo $currency->createPriceDiv ('unitPrice'$unitPriceDescription$product->prices);
}
?>

</div>


2cool

Does anyone know what file should be modified to show base price and discount price without tax?
Need to add a simple sale category for b2c and b2b shoppers...

Thanks in advance,

Pas

2cool

Hi,
Wonder if there's an option to get some help with vm customization.
Could anyone tell me how.
Is there some paid support to get this done?

Thanks and regards,
Pas

2cool

After a month still no reply...
Aren't there any options to get support for some virtuemart customizations?

I'm not a programmer but need some help with some 'easy' changes;
- invoice layout
- product sale option

Been asking if this could be done with any of the support options:
http://extensions.virtuemart.net/support

Hope someone could tell me what options there are.

Thanks & regards,
Pas

K&K media production

Yes it's possible as commercial job. I'll send you a pm.