Php error when you enter the code in the cart


  • Default avatar
    pensare_web_srl    
     11 years ago
    0

    Hello,
    this is my first post.
    After entering the coupon code in your shopping cart appears this error:
      Call to a member function createPriceDiv () on a non-object in / usr / local / www / vhosts / XXXXX / httpdocs / components / com_virtuemart / views / cart / tmpl / default_pricelist.php on line 162

    What should I do?

    Joomla: 2.5.8
    Virtuemart: 2.0.14
    AwoCoupon Pro 2.1.3
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    After entering a coupon is the url forwarding to
    index.php?option=com_virtuemart&view=cart&task=edit_coupon

    and then you receive the warning?
  • Default avatar
    pensare_web_srl    
     11 years ago
    0

    This is the url address to which I come after I put in the coupon:
    index.php?option=com_virtuemart&view=cart&task=edit_coupon

    Yes, on this page I get the fatal error that I reported.
  • Your avatar
    seyi    
     11 years ago
    0

    Please try this solution:
    https://awodev.com/forum/awocoupon/help-section/awo-pro-2-virtuemart-2-not-recognizing-coupon-does-discount#comment-3978
  • Default avatar
    pensare_web_srl    
     11 years ago
    0

    Thank you for showing, but unfortunately I get the same error
  • Your avatar
    seyi    
     11 years ago
    0

    hi can you send me access to take a look and give me instructions on how to reproduce the problems? You can send a private message.
  • Your avatar
    seyi    
     11 years ago
    0

    thanks for the access. Ok, this is the only true fix I have found for this problem, if you do not want to disable the store coupons:

    in www/components/com_virtuemart/helpers/cart.php, around line 815 is this code:
    <?php
        
    if (!empty($redirectMsg)) {
            
    $this->couponCode '';
            return 
    $this->redirecter('index.php?option=com_virtuemart&view=cart&task=edit_coupon' $redirectMsg);
        }
    ?>


    comment out the return so it looks like this
    <?php
        
    if (!empty($redirectMsg)) {
            
    $this->couponCode '';
            
    //return $this->redirecter('index.php?option=com_virtuemart&view=cart&task=edit_coupon' , $redirectMsg);
        
    }
    ?>