Author Topic: Product Dimensions in checkout  (Read 615 times)

tyk007

  • Beginner
  • *
  • Posts: 4
  • A beginner
Product Dimensions in checkout
« 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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9245
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Product Dimensions in checkout
« Reply #1 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tyk007

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product Dimensions in checkout
« Reply #2 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9245
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Product Dimensions in checkout
« Reply #3 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; ?>
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tyk007

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product Dimensions in checkout
« Reply #4 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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9245
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Product Dimensions in checkout
« Reply #5 on: October 10, 2015, 23:12:22 pm »
line 34

if I add debug

Code: [Select]
<?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

Code: [Select]
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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

tyk007

  • Beginner
  • *
  • Posts: 4
  • A beginner
Re: Product Dimensions in checkout
« Reply #6 on: October 12, 2015, 10:44:17 am »
Thanks for all your trouble GJC.
I 'll get a developer to look.