Issue with 2.0.18a?


  • Default avatar
    mikekiy    
     11 years ago
    0

    Seyi

    Having upgraded VM to 2.0.18a the coupons seem to have become unreliable - are you aware of any fixable issues with the latest release?

    An information Message is generated saying that 'Discount Coupon successfully added' but this is not reflected in the cart.

    Any ideas?

    Kind regards

    Mike
  • Your avatar
    seyi    
     11 years ago
    0

    HI Mike,

    Only issue so far is this:
    https://awodev.com/forum/awocoupon/help-section/how-display-automatic-discount-ajax-cart-popup
  • Default avatar
    mikekiy    
     11 years ago
    0

    Seyi

    Thanks for the information - the file name has been changed to 'calculationh.php' in 2.0.18a but I regret that the suggested change has made no difference and the discount codes are not working.

    Any other suggestions would be appreciated.

    Kind regards

    Mike
  • Your avatar
    seyi    
     11 years ago
    0

    Hi Mike,

    I set up an environment with Virtuemart 2.0.18a and AwoCoupon Pro 2.1.4 and tested out some coupons and did not see any problems. Is there a specific type of coupon you are using? Automatic discounts or normal coupons?
  • Default avatar
    thezak    
     11 years ago
    0

    Hi,
    i have same problem, (i use joomla version 2.5.9 and vm 2.0.18a)
    when i insert an invalid coupon code i get these message (togheter):

    * Discount Coupon successfully added
    * Coupon code not found. Please try again.

    the second message is ok, but why i get "succesfully added" if the code is wrong ?
    i have installed awocoupon and onepage checkout..

    i try to uninstall all but double message still showing....

    in another test site i have same exatly configuration, but everythings work good... so i think that the problem is from virtuemart and not other components..

    you have any idea to solve ?

    thanks,
    zak.
  • Your avatar
    seyi    
     11 years ago
    0

    Hi,

    What version of AwoCoupon are you using?
  • Default avatar
    thezak    
     11 years ago
    0

    version 2.0.5 free version dowloaded this morning..
    thanks, zak
  • Default avatar
    david6    
     11 years ago
    0

    This is the same thing. I am not seeing the coupon calculated. But when the customer checks out it is there! Like Scooby what are we going to do. Ruh Roh.

    I am asking on VM forum whey the coupon is not showing. I only got the error coupon not found when inputting before shipping.
  • Your avatar
    seyi    
     11 years ago
    0

    Hello Zak,

    Got the problem now, yes, it was added in recent version of Virtuemart. There are 2 solutions, can either alter Virtuemart or AwoCoupon. Here they are.

    For Virtuemart, we remove the message, but this means it will not show if a coupon is successfully added:
    in www/components/com_virtuemart/helpers/cart.php, around line 695 is this
    <?php
            
    return JText::_('COM_VIRTUEMART_CART_COUPON_VALID');
    ?>

    Change it to this
    <?php
            
    return '';
    ?>



    Now for AwoCoupon solution, which strips out the message if there is an error
    in www/components/com_awocoupon/helpers/vm_coupon.php, around line 273 is this
    <?php
        
    function return_false($key) {
    ?>


    Right after that add this
    <?php
            
    // strip out Virtuemart successful message
            
    $orig_messages $messages JFactory::getApplication()->getMessageQueue();
            foreach(
    $messages as $k=>$message) {
                if(
    $message['type']=='message' && $message['message']==JText::_('COM_VIRTUEMART_CART_COUPON_VALID')) {
                    unset(
    $messages[$k]);
                }
            }
            if(
    $orig_messages != $messages) {
                
    $session JFactory::getSession();
                
    $session->set('application.queue', empty($messages) ? null $messages);
                
    JFactory::getApplication()->set('_messageQueue',empty($messages) ? '' $messages);
            }
    ?>


    That should do it.
  • Default avatar
    thezak    
     11 years ago
    0

    Hi, thank you for your solution.
    i just delete (on vm) COM_VIRTUEMART_CART_COUPON_VALID, like this:
    return JText::_('');

    for your solution of awocoupont located in
    www/administrator/components/com_awocoupon/helpers/vm_coupon.php (on administrator folder, because on my server, component/awo_coupon is empty)
    i can't insert the code.. i don't know php language and if i insert completely your code, give me blank page.

    in have this from line 273:

    function return_false($key) {
    // display error to screen, if coupon is being set
    //$task = JRequest::getVar('task');
    //if($task == 'setcoupon') {
    $err =JText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
    JFactory::getApplication()->enqueueMessage($err,'error');
    //}

    return;
    }

    function initialize_coupon() {
    $session = JFactory::getSession();
    $session->set('coupon', 0, 'awocoupon');

    // remove from vm session so coupon code is not called constantly
    $this->vmcart->couponCode = '';
    $this->vmcart->setCartIntoSession();

    }

    so how i can insert corretly your code ?

    also, i have another problem.. i create a new coupon like that:

    code: 888
    public: ok
    %: ok
    discount: global
    valore: 88.00
    number: total / 2
    .....
    expiry: 2014/......

    but i can use more ( ∞ ) than just 2 time... where i wrong ?

    thank you,
    zak-
  • Your avatar
    seyi    
     11 years ago
    0

    Yes, I meant administrator/components....

    Your function return_false should look like this:
    <?php
        
    function return_false($key) {
            
    // strip out Virtuemart successful message
            
    $orig_messages $messages JFactory::getApplication()->getMessageQueue();
            foreach(
    $messages as $k=>$message) {
                if(
    $message['message']==JText::_('COM_VIRTUEMART_CART_COUPON_VALID')) {
                    unset(
    $messages[$k]);
                }
            }
            if(
    $orig_messages != $messages) {
                
    $session JFactory::getSession();
                
    $session->set('application.queue', empty($messages) ? null $messages);
                
    JFactory::getApplication()->set('_messageQueue',empty($messages) ? '' $messages);
            }

            
    // display error to screen, if coupon is being set
            //$task = JRequest::getVar('task');
            //if($task == 'setcoupon') {
                
    $err =JText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
                
    JFactory::getApplication()->enqueueMessage($err,'error');
            
    //}

            
    return;
        }
    ?>


    No need to copy the <\?php and ?/> tags. Please open a new forum topic for other questions not dealing with this subject.
  • Default avatar
    thezak    
     11 years ago
    0

    ok, thank you very much, now i insert correct your code.
    i'm sorry for other question, i will test again, after i'll open another topic.

    thank you,
    zak.