History of Uses (UserId)


  • Default avatar
    xpozay    
     8 years ago
    0

    I have just started using my first coupon and it is working wonderfully after the code changes you provided earlier - thanks very much.

    I am using
    - AWO 2.3.8 (with your patches)
    - J 2.5.9
    - VM 2.0.18a
    - Onepage checkout 2.0.286.100415

    I notice that under History of Uses not all the customer details are filled in. For example on some orders I have complete details (Joomla userid, email, discount, username, order number), while others I only have the email, discount, order number. My assumption that this is working correctly and is just a matter if users are existing customers or new customers. Is this correct?

    In my configuration (VM, J, OPC), I do not allow guests to purchase, during the checkout process they must be logged in or register during checkout to complete the purchase. Therefore, I assume that AWO is getting the user details prior to the registration process? But this is the part that confuses me, if AWO is collecting prior to registration why does AWO know the user's email?


    Suggestions / Questions
    - Is it not be possible to collect all the user details?
    - If not possible for some reason, it would be nice to have a button/script in the History of Uses page that we can run to update the records.

    Thanks in advance for your assistance.




  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    The only thing stored in AwoCoupon is the email and order number. The rest of the data is pulled from the user in Virtuemart. Not sure why it would not work for some without debugging.

    You can find the query used for the order history here:
    www/administrator/components/com_awocoupon/helpers/estore/virtuemart/helper.php
    function getQueryHistoryCoupon
  • Default avatar
    xpozay    
     8 years ago
    0

    Thanks. While I have not solved the problem, it certainly has highlighted a major problem.

    What I know is that the userid not being written to the awocoupon_history table - the field user_id is set to 0 for the majority of orders where the coupon is being used.

    I am not sure if related, but the Agreed To Terms is not being written to virtuemart_order_userinfos table in all cases. Also,
    - When the Agree to Terms is set to 1, the created_by field is set to 0
    - When the Agree to Temrs is set to 0, the created_by field is set to the userid

    However, if the Agree To Terms is not checked on the front end, the order cannot be placed.

    I think the above issue is OPC / VM issue but not sure why this would affect AWOCoupon (if it does).

    If this is not related, can you think of any reason why the userid is not being written to the awocoupon_history table?

    Thanks

    Note: As soon as I manually add the userid (using phpmyadmin), the history listing / view works as expected in Show uses

  • Your avatar
    seyi    
     8 years ago
    0

    Ah yes, the user_id. That should be populated with the current logged in user. In AwoCoupon->configuration, how do you have the coupon history trigger set up? Is it on 'order creation'? I have not seen an issue where the user_id is sometimes populated. There must be some type of pattern. Also you might try disabling opc and see if you still get the random behavior.