Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • hoknight Friend
    #1004986

    Dear Support,

    We have installed a Virtuemart plugin "Quantity related price calculation", but it can’t display on Ja Template.The Virtuemart Developer said it is caused by template issues.And he gave the below code to fix this problem.But I’m not sure how to insert this code into default.php in productdetails.

    Can you have a look and help to fix on our site using this code?

    $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_method_id =>$productDisplayHtml) {
         ?>

    <div class="<?php echo substr($productDisplayType, 0, -1) ?> <?php echo substr($productDisplayType, 0, -1).’-‘.$virtuemart_method_id ?>">
    <?php
    echo $productDisplayHtml;
    ?>

    Plugin tutorials page:
    http://extensions.virtuemart.net/all-tutorials/10-calculation-rules/11-quantity-plugin

    Plugin demo:
    http://demo.virtuemart.net/quantity-discount

    Live site: https://shop.gcc.org.hk/all-products/%E7%A6%AE%E5%93%81/gnci177mp3-detail.html

    Thanks.


    1. ScreenShot1416
    Pankaj Sharma Moderator
    #1005115

    Hi
    The path of the file is
    /html/com_virtuemart/productdetails/default.php In the template folder, this is an override of the VM product files, Can u check the insertion of code place becuase there are different container area in product details page.
    If possible you can share this file with VM support team so they can guide you better to place the code.
    Let me know if there is anything need to be changed in the template.

    Best Regards

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 1 reply, has 2 voices, and was last updated by  Pankaj Sharma 7 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum