• It is a powerful plugin, when I create a rule “3 items for $15”, it is automatically load in cart, but I want to combine this function with a coupon code, how can I make it possible?
    For example, if I enter a coupon code “ASD123”, the “3 for $15” loads. If I do not enter coupon code, do not load the rule.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Deardevils

    (@deardevils)

    PS: I have a pro version.

    Plugin Author vark

    (@vark)

    Hi,
    Thanks for your purchase. If I understood correctly, you are asking whether a pricing deal can be initiated on demand using a coupon. Unfortunately the answer is no, not right now. That is on the books for the next big enhancement delivery, which is in the coding stage right now. I expect it will be 6-8 weeks before that enhancement is ready for prime time.
    Best,
    Vark

    Thread Starter Deardevils

    (@deardevils)

    If I hardcode a line and put a condition in front of auto load function, will that work? I only have 1 coupon code and want to hardcode for emergence use.

    Plugin Author vark

    (@vark)

    Hi,
    Sorry, no, it’s quite a bit more complex than that… Pricing Deals has to be educated to activate when coupons are added or removed, and then the inclusion/exclusion logic has to be added.

    Only thing I can currently suggest, is that you create an unique role, and apply the deal to that role. Then you can control the discount for your user community.

    Best,
    Vark

    Plugin Author vark

    (@vark)

    Hi,
    Your question caused me to revisit the whole ‘activation with a coupon’ issue. In the course of looking it all over, I found it wasn’t as death defying an enhancement as I originally thought… I’m releasing an enhancement/fixes later today, and the one you are looking for should be available in a day or two (lots of people had asked for it).
    Best,
    Vark

    Plugin Author vark

    (@vark)

    Hi,
    In the process of testing my approach for the ‘activation with a coupon’ enhancement, I actually created the code you’d need to do your emergency hardcode. Here it is, no warranty, YMMV:

    in pricing deals pro/core/vtprd-apply-rules.php
    public function vtprd_test_cart_for_rules_populations() {
    starting with line 293.  copy in the code from '//v1.1.0.7 begin' on, alter to suit:
        //************************************************
        //FIRST PASS:
        //    - does the product participate in either inPop or actionPop
        //************************************************
        $sizeof_rules_set = sizeof($vtprd_rules_set);
        for($i=0; $i < $sizeof_rules_set; $i++) {                                                               
    
          //v1.1.0.7 begin
          if ($vtprd_rules_set[$i]->post_id == '[your rule ID]') {
            $coupon_found = false;
            $applied_coupons = WC()->cart->get_coupons();
            foreach ( $applied_coupons as $code => $coupon ) {
              if ( $code == '[your coupon NAME]' ) {
                $coupon_found = true;
                break;
              }
            }
            if (!$coupon_found) {
              $vtprd_rules_set[$i]->rule_status = 'noCouponFound';
            }
          }

    Thread Starter Deardevils

    (@deardevils)

    Thank you so much for you suggestion and help.
    I got a white screen after I added the code, but that is all right. I will do some research and waiting for the next update. Hope you have a good day.

    Plugin Author vark

    (@vark)

    Hi,
    Did you make the changes requested in the code (replacing [—] with the named info)?? anyway, enhancement will be coming shortly.
    Best,
    Vark

    Thread Starter Deardevils

    (@deardevils)

    Yes, I replaced the [your role id] and [my code]. From the inspect elements, I cannot see any error from console, but still white screen. Do not know why.

    Plugin Author vark

    (@vark)

    hmmm… If you’d like, please drop my a line at my support channel https://www.varktech.com/support/
    and I’ll send you the beta as soon as possible…
    Best,
    Vark

    Plugin Author vark

    (@vark)

    Hi,
    Enhancement to activate the rule solely with a coupon is now up in www.ads-software.com!

    Thanks for all your help!

    Best,
    Vark

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘good plugin, but may need something more’ is closed to new replies.