News:

Support the VirtueMart project and become a member

Main Menu

shipment not shown in product details

Started by p.barg, May 18, 2017, 11:27:00 AM

Previous topic - Next topic

p.barg

Hello,

I'm updating a site from j3.6.5/VM 2.018 to J3.7.1/VM 3.2.2
The following issue occured: in the product details view the shipping costs are no longer shown (used to be "Per DHL für 3,00 €"),
Instead the character P is shown...
Any ideas?

-- Petra

Milbo

There was a layout update, I think in vm3.0.18
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

p.barg

That was a typo, sorry. I was using VM 3.0.18. In that version it works fine. The issues arises in VM3.2.2.
I've taken a look and the problem seems to be in file .../plugins/vmshipment/weight_countries/weight_countries.php.
Line 461: $html[$this->_currentMethod->virtuemart_shipmentmethod_id] = $this->renderByLayout( 'default', array("method" => $this->_currentMethod, "cart" => $cart,"product" => $product,"currency" => $currency) );
produces the letter P (at least in my installation). I replaced the line by the one in VM3.0.18 ($html = $this->renderByLayout( 'default', array("method" => $this->_currentMethod, "cart" => $cart,"product" => $product,"currency" => $currency) );) and that works ok for me.
Maybe you can take a look at that?

Milbo

Do you use in the default.php

      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_method_id =>$productDisplayHtml) {
               ?>
               <div class="<?php echo substr($productDisplayType, 0, -1) ?> <?php echo substr($productDisplayType, 0, -1).'-'.$virtuemart_method_id ?>">
                  <?php
                  echo $productDisplayHtml;
                  ?>
               </div>
               <?php
            }
         }
      }

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

p.barg

arrgh, your're right  :-[. Thought I had tested with the standard file default.php, but obviously I didn't...
Works ok with the standard default.php.

Sorry!

ctubu

FYI
J 3.7.2 and VM 3.2.3 I have same problem as described above. It arises when using PHP 7.1, on 7.0 there is not such problem.

ClaudioRomeo

@ctubu
Confirmed. J3.72 + VM3.2.2. In a php 7.1 environment this option doesn't work. In a php 7.0 one, it does.
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com