Entering Commission issue


  • Your avatar
    seyi    
     5 years ago
    0

    Hello,

    I am having 2 problems:

    1) could you improve the selection/search of affiliate? I have 20.000+ users on the site. A scroll bar is just too tough to find one within 20.000

    2) I am not sure I understand the " commission menu" in the admn side. I take it as a way to manually enter a commission on a specific sale that, for some reason, did not record. If I understand it well, then the problem is that once a coupon code has been linked to an affiliate, this coupon code does not appear in the scroll down list in the commission page. On the other hand, if a create a commission from the admin with a coupon code, this coupon code is not available anymore to assign to an affiliate. Am i missing something?

    Thanks!

    Julien
  • Your avatar
    seyi    
     5 years ago
    0

    Hi Julien,

    That is alot of users. I will come up with an ajax way of loading the users.

    For the second problem, yes, it does not make sense, problem with the code. For now here is the fix (will be fixed in the next version)
    in www/administrator/components/com_awocoupon_affiliate/models/commission.php, line 106
    <?php
       WHERE c
    .published=AND c.function_type="coupon" AND (a.coupon_id IS NULL OR cm.id='.$this->_id.')
    ?>


    please change it to this
    <?php
       WHERE c
    .published=AND c.function_type="coupon" AND (cm.coupon_id IS NULL OR cm.id='.$this->_id.')
    ?>


    that should fix that problem
  • Default avatar
    julien7    
     5 years ago
    0

    Thank you. This seems to work.

    I am now trying to set up the front end link for an affiliate to view their commissions (see footer menu, "Parner Coupons" at www.frenchwinesociety.org).

    If one is not logged in or logged in and not an affiliate, the link goes nowhere. If you are logged in and are an affiliate, it works. This is probably a rookie question, but how could I only have this menu item show to logged in affiliates? Or is there a way to have a page say "you need to be an approved partner coupon affiliate and logged in to access this page". Can you help me?

    Merci!

    Julien
  • Default avatar
    julien7    
     5 years ago
    0

    oh, and I forgot to say, the " orders" count seems not to work on the front end. It says "1" for all 3 coupons an affiliate has while two have 0 orders and one has one. Julien
  • Default avatar
    julien7    
     5 years ago
    0

    Another thing (I guess I am one of the first testers!):

    I manually changed the commission purcentage of an affiliate from 10% to 15%.

    Did not automatically update the past order commission. Which is fine. I tried to manually change the $ value of the commission for that order, hit save and got:

    • DB function failed with error number 1054
    Unknown column 'value' in 'field list' SQL=UPDATE `jos_awoaffiliate_commission` SET `user_id`='5260',`coupon_id`='2',`order_number`='1000052_b4e145646a151cdccf369f3f',`commission`='63.00',`amount_paid`=NULL,`value`=NULL WHERE id='1'
  • Default avatar
    julien7    
     5 years ago
    0

    Error code got cut off:

    DB function failed with error number 1054
    Unknown column 'value' in 'field list' SQL=UPDATE `jos_awoaffiliate_commission` SET `user_id`='5260',`coupon_id`='2',`order_number`='1000052_b4e145646a151cdccf369f3f',
    `commission`='63.00',`amount_paid`=NULL,`value`=NULL WHERE id='1'
  • Your avatar
    seyi    
     5 years ago
    0

    Not so much a rookie question. When not logged in, it redirects to the home page. When logged in and not having an affiliate coupon, it displays the summary page with no data. Think in the future, will add a configuration parameter where you can set the page you want to forward to when 1) user is not logged in and 2) when the user is not an affiliate

    For now, you can manually edit the code. In www/components/com_awocoupon_affiliate/awocoupon_affiliate.php, on line 12, you will see this
    <?php
    if(empty($user->id)) $mainframe->redirect'index.php' );
    ?>


    after that add this
    <?php
    $sql 
    'SELECT user_id FROM #__awoaffiliate WHERE user_id='.$user->id.'
                    UNION
            SELECT user_id FROM #__awoaffiliate_commission WHERE user_id='
    .$user->id;
    $db =& JFactory::getDBO();
    $db->setQuery($sql);
    $user_id $db->loadResult();
    if(empty(
    $user_id)) $mainframe->redirect'index.php' );
    ?>


    Now in both sections, you can edit
    <?php
    $mainframe
    ->redirect'index.php' );
    ?>

    to point to the url you would like
  • Your avatar
    seyi    
     5 years ago
    0

    www/components/com_awocoupon_affiliate/models/summary.php, line 33
    <?php
    $sql 
    'SELECT a.coupon_id,c.coupon_code,a.commission_rate,a.commission_type,COUNT(IFNULL(ac.order_number,0)) as order_count,
    ?>


    change to
    <?php
    $sql 
    'SELECT a.coupon_id,c.coupon_code,a.commission_rate,a.commission_type,COUNT(ac.order_number) as order_count,
    ?>

  • Your avatar
    seyi    
     5 years ago
    0

    www/administrator/components/com_awocoupon_affiliate/tables/awoaffiliate_commission.php, delete line 18
    <?php
    var $value null;
    ?>
  • Your avatar
    seyi    
     5 years ago
    0

    All of these solutions have now been incorporated into the latest version, 1.0.1.