Problem creating coupon VirtueMart 1.1.9 y joomla 1.5


  • Default avatar
    victor_manuel    
     8 years ago
    0

    PHP funcionando con: Linux fnhcc-09.srv.cat 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64
    Versión de la base de datos: 5.5.38-1~dotdeb.0-log
    Cotejamiento(collation): utf8_general_ci
    Versión de PHP: 5.3.29-1~dotdeb.0
    Servidor web: Apache
    Interfaz PHP del servidor: apache2handler
    Versión de Joomla!: Joomla! 1.5.26 Stable [ senu takaa ama busani ] 27-March-2012 18:00 GMT

    after enabling coupon buy x obtain y

    following error on cart

    Fatal error: Call to undefined method AwoCouponVirtuemart1CouponHandler::is_coupon_in_store() in /usr/home/mundoarcoiris.com/web/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php on line 199
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    This error has to do with enabling store coupons in Virtuemart 1.1.x. I replied to your email, did you not receive it?

    In any case, here is the quick fix:
    in www/administrator/components/com_awocoupon/helpers/estore/virtuemart1/couponhandler.php, before the last losing bracket "}", add the following function
    <?php
        
    protected function is_coupon_in_store($coupon_code) {
            if(empty(
    $coupon_code)) return false;
            
            
    $db JFactory::getDBO();
            
    $db->setQuery('SELECT coupon_id FROM #__vm_coupons WHERE coupon_code='.$db->Quoteawolibrary::dbEscape(trim($coupon_code))) );
            
    $coupon_id = (int)$db->loadResult();
            
            return !empty(
    $coupon_id) ? true false;
        }
    ?>


    That should fix the issue.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    reinstall and
    Warning: Invalid argument supplied for foreach() in administrator/components/com_awocoupon/install.awocoupon.php on line 473
  • Default avatar
    victor_manuel    
     8 years ago
    0

    also trying ton handle a coupon get

    Fatal error: require_once(): Failed opening required '/usr/home/mundoarcoiris.com/web/administrator/components/com_awocoupon/assets/virtuemart/ps_coupon_process.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/home/mundoarcoiris.com/web/administrator/components/com_virtuemart/classes/ps_coupon.php on line 164
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    This is a warning and should not have affected the base install. You can manually install available languages in awocoupon->configuration->language manager

    Did you get the initial error working?
  • Your avatar
    seyi    
     8 years ago
    0

    ps_coupon.php was part of AwoCoupon 1. What you are installing is AwoCoupon 2 and this would cause a problem.

    Did you have the free version or pro version of AwoCoupon 1 installed initially.

    The code added for AwoCoupon 1 free is documented here:
    http://www.awocoupon.com/documentation/awocoupon-virtuemart

    Can you remove it? Also if you prefer I look at it directly I can, please send a private message with temp admin and ftp access.
  • Default avatar
    victor_manuel    
     8 years ago
    0

    the error begin when adding new language... spanish until then it works fine
    now i have reinstall it and keep english version to avoid this error