Recent Posts

Pages: [1] 2 3 ... 10
Product pricing / Issues with getting variant products / layout
« Last post by SpydrSS on Today at 16:32:11 »

VirtueMart 3.0.18

I would hate it if someone says this cant be achieved with virtuemart, as I am always promoting virtuemart to my clients, and I have made a number of shopping carts, however I am stumped on this one:

I basically have 2 issues:

1) My client wants to sell contact lenses, and such it has attributes, and an option to buy a box for the left eye and a box for the right, or both. So my problem is that I am not achiving this with child varients or multi variants. This is what I want:

But this is as far as I can get:
Option 1: (This product has no price in category view) or
Option 2: (This product Woul be ideal if I could get either the left or right eye to have a select box for each one to add to cart...

Unfortunately I cant get my head around the multi variants as I am sure this would be the right way to go, but there are so many variants as you can see by the drop down SPH/PWR... Is there an easy way to set this up...

The fun part also coming in the next phase is the frames (and option dor lenses)... So a client will be able to purchase a frame, and then have the option to add lenses with atributes as per this site: <- Please click on the add to cart button, and then you will see the attributes...

I would hate to go away from virtuemart, however I am stumpoed and on a time limit... PLEASE HELP :-[

Stanley Rieck

Here is th code i have in my html override, in sublayout => price.php

Code: [Select]
 * Show the product prices
 * @package    VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen
 * @link
 * @copyright Copyright (c) 2004 - 2014 VirtueMart Team. All rights reserved.
 * @license 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 ?>">
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>
} 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]) != $product->prices['salesPrice']) {
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]) != $product->prices['salesPrice']) {
echo $currency->createPriceDiv ('salesPriceWithDiscount''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT'$product->prices);

echo $currency->createPriceDiv ('salesPrice''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);
} else {
echo $currency->createPriceDiv ('priceWithoutTax''COM_VIRTUEMART_PRODUCT_SALESPRICE_WITHOUT_TAX'$product->prices);
echo $currency->createPriceDiv ('discountAmount''COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT'$product->prices);
echo $currency->createPriceDiv ('taxAmount''COM_VIRTUEMART_PRODUCT_TAX_AMOUNT'$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 class="clear"></div>

i have read many post on this subject, but no one can resolve this basic problem for a e-shop. I dont understand we have this problem on a great component like Virtuemart...

I want to show the final price for all the products.
If i have a discount, i want to show the base price without discount, the final price with discount and the amount of discount.
If i activate the base price in my VM config, i have what i want, but for the non discount product, i have too the base price, and the final price, wich are the same = I dont want this.

So, actually, in my price configuration i have activate :
- Base price with tax, without discount => but it show NOTHING
- Final price
- Amount of discount

If you go in the url page :
you can see (at the end of the page) my "Argent colloidal TEST" with the Final price and discount amount but NOT the base price without discount.

I am not programmer and that make many month i try to resolve this issue, so if somebody can tell me what code i have to put in what folder, i was very happy :)

Thanks for help,
You can use a sitemap, because you have now alias, i think it's simpler for you.
You can use for eg :
to get all the links
I've added a shopper field (as single checkbox) named Tax Exemption. Whenever a user checks it, tax amount added to product is removed and vice versa. I've used this shopper field id in my script for calculation purposes.
Now , when final checkout is done and cart values are stored in table (order details) , I want that this value is carried to cart session so that on basis of its selection I store the total amount to order table .

I'm using VirtueMart 3.0.18 on Joomla 3.3.6 php 5.4.45

The details which I'm getting in administrator\components\com_virtuemart\models\orders.php is this :
    [basePrice] => 257
    [basePriceWithTax] => 272.42
    [discountedPriceWithoutTax] => 257
    [salesPrice] => 272.42
    [taxAmount] => 15.42
    [salesPriceWithDiscount] => 0
    [discountAmount] => 0
    [priceWithoutTax] => 257
    [subTotalProducts] => 0
    [billTotal] => 272.42
    [5Diff] => -15.42
=> Array

            [virtuemart_product_price_id] => 86
            [virtuemart_product_id] => 1257
            [virtuemart_shoppergroup_id] => 0
            [product_price] => 257
            [override] => 0
            [product_override_price] => 0
            [product_tax_id] => 0
            [product_discount_id] => 0
            [product_currency] => 144
            [product_price_publish_up] => 0000-00-00 00:00:00
            [product_price_publish_down] => 0000-00-00 00:00:00
            [price_quantity_start] => 0
            [price_quantity_end] => 0
            [created_on] => 2016-08-05 13:06:49
            [created_by] => 814
            [modified_on] => 2016-11-17 10:57:17
            [modified_by] => 814
            [locked_on] => 0000-00-00 00:00:00
            [locked_by] => 0
            [costPrice] => 257
            [basePrice] => 257
            [basePriceVariant] => 257
            [basePriceWithTax] => 272.42
            [discountedPriceWithoutTax] => 257
            [priceBeforeTax] => 257
            [salesPrice] => 272.42
            [taxAmount] => 15.42
            [salesPriceWithDiscount] => 0
            [salesPriceTemp] => 272.42
            [unitPrice] => 0
            [priceWithoutTax] => 257
            [discountAmount] => -0
            [variantModification] => 0
            [DBTax] => Array

            [Tax] => Array

            [VatTax] => Array
                    [5] => Array
=> Default tax
[1] => 6.0000
                            [2] => +%
                            [3] => 0
                            [4] => 47
                            [5] =>
                            [6] => 1
                            [7] => 5


            [DATax] => Array

[Marge] => Array

            [subtotal_with_tax] => 272.42

    [salesPriceDBT] => Array

    [taxRulesBill] => Array

    [DATaxRulesBill] => Array

    [toTax] => 272.42
    [salesPriceCoupon] => 0
    [withTax] => 272.42
    [shipmentValue] => 0
    [shipmentTax] => 0
    [salesPriceShipment] => 0
    [shipment_calc_id] => 0
    [cost] => 0
    [paymentValue] => 0
    [paymentTax] => 0
    [paymentTotal] => 0
    [salesPricePayment] => 0
    [payment_calc_id] => 0
    [payment_tax_id] => 0
    [payment_value] => 0
    [billSub] => 257
    [billDiscountAmount] => 0
    [billTaxAmount] => 15.42

I want that checkbox value included in this array . How this can be achieved ?
Yes it is an HTML table I was using to link all of the products added. The links I was using was from pulling up the product on the front-side and then add that link to the table. Right now I have the same thing going on linking the SEO url; would you recommend a better way to go about it?

Also I have something else going on and I am not sure if it is a setting or a bug. I have started adding images for the categories, well when I add a new category without adding an image to it, an image is automatically added when I save the category, then I have to go in and remove the image. Any thought?
If u do want to just echo out the static info of the payment method I would just do a std.Joomla query for it in the email template .. Google!

But the name and/or desc might be in an object available in the email template.. u need to check
I see.. not very handy..

the case is that payment method related additional information is needed to given after purchase, not on the frontend. Thus, the email is handy tool for that.

I need to figure out another solution.

How am I able to echo Anything from the database?    (This might be easy question, but I am not a coder.)
saved in the #_virtuemart_payment_plg_xxxx  table each purchase

if u wanted just the name guess you need to query the  #_virtuemart_paymentmethods_en_gb etc table with the payment id or split up the current return
Pages: [1] 2 3 ... 10