"Exclude Products on Special" is applying to products marked as "Featured" in virtuemart


  • Default avatar
    davidb1    
     9 years ago
    0

    I have a list of three scenarios below that outline the trouble I am having with AWO Coupon. The First two items I believe to be behaviour a store owner would expect. The last item seems to be unexpected or unintuitive.

    Create a new coupon on AWO Coupon and check the box "Exclude Products on Special":

    1. The coupon does not apply to products that have a discount applied through virtuemarts "tax & calculation Rules"

    2. If the same product has neither a discount applied and is also not marked as featured the coupon code applies as expected.

    3. If the same product is marked at "Featured" in virtuemart and does not have a "tax & calculation Rule" applied the coupon code still does not work.



    Just a side note but if the "Exclude Products on Special" box is left unchecked in AWO Coupon any combination of discount and featured can be used in virtuemart and the coupon code still applies.

    A "product on special" implies a monetarily discounted product.
    A "Featured" product is added to a subset of products that a store owner has chosen to promote more than others, on the homepage or in a module, and does not necessarily have a monetary discount applied.

    ------------ My Question
    This feels like a bug but I noticed in version 2.1.0 released on 8-10-12 it is listed as a feature change. I also found the forum post below asking for this as a feature and to have it implemented in this way.

    https://awodev.com/forum/awocoupon/help-section/coupon-product-no-promo

    Since I do want to exclude the coupon code from items that are discounted but don't want to exclude products that are only marked as "featured".

    Is it possible to either break out "Exclude Products on Special" into two checkboxes. The first to "Exclude Discounted Products" and the second to "Exclude Featured Products"?

    Or can I make a few changes to the code that will create the behavior I am looking for?

  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    Yes, this does seem to confuse. I think in the future they will become 2 different checkboxes.

    But in the mean time, to solve the problem for your specific situation, here is what you can do.

    In www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, around line 880 is this
    <?php
                
    if(empty($product_discount)) {
                    
    $product_table $this->getProduct($productId);
                    
    $product_discount $product_table->product_special;
                }
    ?>


    Comment it out or delete that code
    <?php
                
    //if(empty($product_discount)) {
                //    $product_table = $this->getProduct($productId);
                //    $product_discount = $product_table->product_special;
                //}
    ?>


    That will allow featured products to be included in discounts even if exclude products on special is marked.