• Default avatar
    david22    
     9 years ago
    0

    I use the Awocoupon Prestashop module... how to allow partial use ?
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    There are no partial use in AwoCoupon. Instead we have gift certificates, which will allow a customer to use a coupon code as many times as needed until the value is 0.
  • Default avatar
    david22    
     9 years ago
    0

    Hum I don't understand... I want to create coupons to offer to partners (ex. 1000€) and let them use it partially.

    Don't think it's possible with gift certificates... they have to buy it, no ?
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    No, you can allow them to buy it but you can manually create it yourself when creating a coupon. Just select 'gift certificate' for function type.
  • Default avatar
    david22    
     9 years ago
    0

    Can you give me the full process to create a code that I can send and allow partial use ?
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    AwoCoupon->New Coupon

    Function Type: Gift Certificate
    Coupon Code: [enter a coupon code]
    Value: [the actual value]

    Save and you can give the coupon code to the customer. This will allow the customer to use the coupon code as many times as is needed until the value reaches 0.
  • Default avatar
    david22    
     9 years ago
    0

    Ok, but we can't exclude products on special :(

    And that's why we are using your module instead of the default prestashop functionality...
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    No, the on special is not built for gift certificates. If that is an absolute requirement you can edit the code to have that behavior. It will exclude specials for all gift certificates. Here is how:
    in www/modules/awocoupon/lib/couponhandler.php, around line 446 is this:
    <?php
                
    if(!empty($coupon_row->params->exclude_giftcert)) {
                    
    $ids ''; foreach($coupon_row->cart_items as $tmp$ids .= $tmp['product_id'].',';
                    if(!empty(
    $ids)) {
                        
    $sql 'SELECT product_id FROM '._DB_PREFIX_.'awocoupon_giftcert_product WHERE product_id IN ('.substr($ids,0,-1).')';
                        
    $test_list awoHelper::loadObjectList($sql,'product_id');

                        foreach(
    $coupon_row->cart_items as $k=>$tmp) { if(isset($test_list[$tmp['product_id']])) unset($coupon_row->cart_items[$k]); }
                    }
                }
    ?>


    Right after that add this
    <?php
                
    foreach($coupon_row->cart_items as $k=>$tmp) {
                    if(
    $tmp['on_sale']) unset($coupon_row->cart_items[$k]);// remove specials
                
    }
                if(empty(
    $coupon_row->cart_items)) {
                    
    // all products in cart are on special
                    
    return $this->return_false('errDiscountedExclude');
                }
    ?>


    Thats it.