Author Topic: 3.0.18.5: "We send to" error  (Read 1151 times)

ClaudioRomeo

  • Jr. Member
  • **
  • Posts: 99
    • VirtueMart Matters
3.0.18.5: "We send to" error
« on: November 24, 2016, 08:56:32 am »
J 3.6.4
VM 3.0.18.5
PHP     5.5.37

After the update to VM 3.0.18.5, the product details page doesn't show the countries where the shop delivers any longer.
Near the price there is now a generic string "Array".
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 3.0.18.5: "We send to" error
« Reply #1 on: November 24, 2016, 09:48:46 am »
Which shipment plugin do you use? Reason could be that we changed in view productdetails, the default layout, this
Code: [Select]
if (is_array($this->productDisplayShipments)) {
  foreach ($this->productDisplayShipments as $productDisplayShipment) {
echo $productDisplayShipment . '<br />';
    }
}
if (is_array($this->productDisplayPayments)) {
    foreach ($this->productDisplayPayments as $productDisplayPayment) {
echo $productDisplayPayment . '<br />';
    }
}

to this
Code: [Select]
$productDisplayTypes = array('productDisplayShipments', 'productDisplayPayments');
foreach ($productDisplayTypes as $productDisplayType) {

if(empty($this->$productDisplayType)){
continue;
} else if (!is_array($this->$productDisplayType)) {
$this->$productDisplayType = array($this->$productDisplayType);
}

foreach ($this->$productDisplayType as $productDisplay) {

if(empty($productDisplay)){
continue;
} else if (!is_array($productDisplay)){
$productDisplay = array($productDisplay);
}

foreach ($productDisplay as $virtuemart_shipmentmethod_id =>$productDisplayHtml) {
?>
<div class="<?php echo substr($productDisplayType0, -1?> <?php echo substr($productDisplayType0, -1).'-'.$virtuemart_shipmentmethod_id ?>">
<?php
echo $productDisplayHtml;
?>

</div>
<?php
}
}
}
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ClaudioRomeo

  • Jr. Member
  • **
  • Posts: 99
    • VirtueMart Matters
Re: 3.0.18.5: "We send to" error
« Reply #2 on: November 24, 2016, 10:35:25 am »
Quote
Which shipment plugin do you use?
Weight Countries.

I'm not a developper, so I can't say anything about the code.
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 3.0.18.5: "We send to" error
« Reply #3 on: November 24, 2016, 11:14:00 am »
What happens, when you disable your template overridE?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ClaudioRomeo

  • Jr. Member
  • **
  • Posts: 99
    • VirtueMart Matters
Re: 3.0.18.5: "We send to" error
« Reply #4 on: November 25, 2016, 07:55:47 am »
It works well.
Thank you for the light, Milbo.
I'll fix my override.
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com