VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: tyk007 on October 09, 2015, 23:12:42 PM

Title: Product Dimensions in checkout
Post by: tyk007 on October 09, 2015, 23:12:42 PM
Hi

I am using Joomla 3.4.4  and VM 3.0.10

Is there a way to display the volume m3 ( heightxdepthxlength ) of a product  by product details on front end and also to display this info in the cart?

It must not add to price as shipping cost.

Thanks
Title: Re: Product Dimensions in checkout
Post by: GJC Web Design on October 09, 2015, 23:34:32 PM
in each product row of the components\com_virtuemart\views\cart\tmpl\default_pricelist.php dimensions are available

$prow->product_length
$prow->product_width
$prow->product_height

over ride this file then

just calc and display
Title: Re: Product Dimensions in checkout
Post by: tyk007 on October 10, 2015, 02:31:00 AM
Thanks for the response - I don't see this

$prow->product_length
$prow->product_width
$prow->product_height


in my pricelist.php file though?

I have attached the file.
Title: Re: Product Dimensions in checkout
Post by: GJC Web Design on October 10, 2015, 10:16:11 AM
they are there -- you have to access them in your code

<?php echo 'the length is: '.$prow->product_length; ?>
Title: Re: Product Dimensions in checkout
Post by: tyk007 on October 10, 2015, 19:59:42 PM
Hi GJC

Thanks but the length width height is definitely not in the code of my file   components\com_virtuemart\views\cart\tmpl\default_pricelist.php

Maybe I need to add ? Or configuration not correct?
Title: Re: Product Dimensions in checkout
Post by: GJC Web Design on October 10, 2015, 23:12:22 PM
line 34

if I add debug

<?php
$i 
1;

foreach (
$this->cart->products as $pkey => $prow) {
print 
'Debug Line '.__LINE__.' $prow <pre>'print_r ($prow); print "</pre><br />\n";
$prow->prices array_merge($prow->prices,$this->cart->cartPrices[$pkey]);
?>



what is there


Debug Line 34 $prow
TableProducts Object
(
    [virtuemart_product_id] => 161
    [virtuemart_vendor_id] => 1
    [product_parent_id] => 159
    [product_sku] => PRCB
    [product_gtin] =>
    [product_mpn] =>
    [product_name] => Cap "Baseball"
    [slug] => cap-baseball
    [product_s_desc] => Need something genuine for your freetime?
    [product_desc] =>

This product is derived from a pattern for other products. It is a parent product and has multiple child products.
You can set several settings (content, customfields) for parent product. Childs of this parent will basically have the same settings as the parent automatically inherit except you overwrite the settings.


In this case product price is set in pattern.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   


    [product_weight] => 100.0000
    [product_weight_uom] => G
    [product_length] => 20.0000
    [product_width] => 20.0000
    [product_height] => 20.0000
    [product_lwh_uom] => CM

continues

Title: Re: Product Dimensions in checkout
Post by: tyk007 on October 12, 2015, 10:44:17 AM
Thanks for all your trouble GJC.
I 'll get a developer to look.