Earn points problem (Coupon + earned points combo)

  • Posts: 171
  • Thank you received: 9
8 years 8 months ago #233480

-- HikaShop version -- : 2.6.1.

Hi!

1.) I noticed that if a user uses his earned points as a partial payment, and also useses a coupon code besides, the base of the points earned by the actual order is decreased by the earlier earned points only, the other one (the coupon's value) is ignored. In that way the user earns more points then he should.

2.) Also a problem that, if user uses his earlier points for a discount and earning point is also turned on, the user do not gets the correct amount of points he deserves (and what is shown correctly in the text in checkout phase), but gets back all the points he used for the order. For example if user uses 200 from his points, and he should earn 40 points with that order, when order is set to shipped he does get back 200 points, but he should just get 40.

3.) When order-created email is going out it shows correctly that user used XXX points in the order. But later, when order's status is changed the outgoing email cointains 0 HUF (zero currency) instead of the earlier XXX points.

Some help would be really-really appreciated!

Last edit: 8 years 8 months ago by pepecortez.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 8 months ago #233489

Hello,

1°) Yes, I valid what you have seen, now let's explain why :
- Your earn point are calculated from products value (understand, price value).
- Your coupon is applied on cart total value.

Now follow this specific case :
- You have two categories each of them have different point value system, or one without point system !
- With the option to calculated earning points from used ones, you can always deduct used points for this command for calculated earned points even at the end of the checkout.

And so, the coupon deduct a value on the total, and so it's difficult for process point calculation.
Nevertheless, if this features is required for you or don't match conditions on above, you can custom HikaShop code to have this feature, but take care that will required good php code notions.
Other solution, contact one of our partner to add this feature.

2°) Does this can be because the order isn't yet confirmed ? Because if order is just created HikaShop know just that customer use these points and when the order will be paid (confirmed) the other point will be add to customer profile.

3°) Ok thanks for your return we have make a check correction in order to correct this point :
- Via an Ftp program, access to your website directory
- YourWebSite\media\com_hikashop\mail and open an modify this file : order_status_notification.preload.php
- Find this code :

if(!empty($additional->order_product_price) || empty($additional->order_product_options)) {
if($config->get('price_with_tax')){
$t = $currencyHelper->format($additional->order_product_price + @$additional->order_product_tax, $data->cart->order_currency_id);

And replace by this :

if( (!empty($additional->order_product_price) && ($additional->order_product_price > 0) ) || empty($additional->order_product_options)) {
if($config->get('price_with_tax')){
$t = $currencyHelper->format($additional->order_product_price + @$additional->order_product_tax, $data->cart->order_currency_id);

Hope this will help you to understand and solve your issue

Regards,

Last edit: 8 years 8 months ago by Philip.
The following user(s) said Thank You: pepecortez

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 8 months ago #233592

Hi Philip,

Thanks for your fast response.

1.) Understood the problem of course, really sorry that is so hard to solve. Maybe later there will be some options to solve.

2.) No. Please if you can, make a test for this case. Again: when earning points is turned on and also user uses his earlier points to get a discount on the same order, when order is created points balance is decreased correctly. User should get his newly earned points later, when his order confirmed. It's OK that this process runs just when the status is set to confirmed, user gets points just that time, Put the number of points is not that quantity what he earned, but the quantity he put in for the discount. It's also a problem that as I set a point expiration (3 months) in AUP rule settings (order_validation), the discount's points also get this expiration. It shouldn't I think. So as I see somehow the system somehow mixtures the 2 kind of points (the decrease value which is used for discount, and the newly earned points')

3.) Tested it, it semms working now correctly. Thanks.

Regards,

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 8 months ago #233601

Hello,

I am unable to reproduce your trouble on my side... Can you provide us a user account WITH backend access to process some test?
For this use our "Contact us" form, and use this topic subject to fill your message subject.

Awaiting news from you.

Regards,

Last edit: 8 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 8 months ago #233672

Philip wrote: Hello,

I am unable to reproduce your trouble on my side... Can you provide us a user account WITH backend access to process some test?
For this use our "Contact us" form, and use this topic subject to fill your message subject.

Awaiting news from you.

Regards,


Just sent it.
Thanks for your help in advance.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 8 months ago #233809

Hello,

I think I get it,see the screenshot on below :



See "valid order statuses" ? You set here your order status Id, but it your order status Name that were awaiting here.
And so, file this value with for example : "confirmed" instead of "6".




Awaiting news from you.

Regards,

Attachments:
Last edit: 8 years 8 months ago by Philip.
The following user(s) said Thank You: pepecortez

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 8 months ago #233830

Oh, shswssss... I was playing with it, but this tricked me. As in my native language the default statuses are translated, and I thought I have to give in that field the ids...
Thanks, now that part seems OK, just the point expiration set is not OK.

I thought on maybe I should create a separate rule for earning points and for changing points to discount, and then using a different rule name in the plugin (because now discount and point earning both has expire date, but just earning should have). Also in that case I would be able to add seperate rule names for them.

For this I should just rename the rule_name (plgaup_orderValidation) to something other in AUP rules, and in the userpoints.php, shouldn't I?

Last edit: 8 years 8 months ago by pepecortez.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 8 months ago #233838

Hi,

As far as I can see, there is no need to change any code. Just set expiration duration in the settings of the plgaup_orderValidation rule in AUP and AUP will automatically set the expiration date for the points added by the user points plugin through this rule.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 7 months ago #236232

Philip wrote: Hi,

As far as I can see, there is no need to change any code. Just set expiration duration in the settings of the plgaup_orderValidation rule in AUP and AUP will automatically set the expiration date for the points added by the user points plugin through this rule.


Dear Philip,

There's a small problem again.

For example user pays 200 points, and should get 40 points for his order.

Earlier point was set to be given in confirmed status. As we want to give points to user when order is in status 'feladva' I've set this name in plugin paramters. But it works really weird. User gets back it's points (in the example 200) he spent on the discount when order is set to confirmed. Then when order changed to 'feladva' status, then user gets -160 points. So cumulatively the final point is ok (it's 40) but the users get really confused. What can couse this?

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 7 months ago #236349

Hello,

Sorry but for a reason or another, I can't access to your backend...
Did you use a plugin in order to hide your administrator access ?
Because when I go to this url : v2.gombolyda.hu/administrator, I arrived here : www.gombolyda.hu/

Awaiting news from you.

Regards,

Last edit: 8 years 7 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 7 months ago #236597

Hi Philip,

Sorry, we've moved that subdomain to live site since, now I've created a test domain again for testing purposes.
I've just sent in PrivateMessage you the new site details via this Forum.

If you're there would you be so kind to check why stock is not taken back if order is cancelled?

Thanks for your help in advance again!

Ps.: Please delete the domain from the earlier post, if it's not a big request.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 7 months ago #236639

Hello,

It seems that your 2 issues are linked to the same thing : your custom status "Feladva", the clue is that your order pass through "feldava".

In Components => HikaShop => Configuration, Order part you must define how must be treat your custom status.

For the user points and stock return, to give or not point and leads stock depends from statuses, and in your backend configuration feldava is unknown...

Before process an order HikaShop looks his actual status (and his configuration) if HikaShop don't understand actual status issue can appear.
If this status is really required for you, define his categorie among cancelled, confirmed, refund etc...

Hope this will help you to solve this.

Regards,

Last edit: 8 years 7 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 9
8 years 7 months ago #236773

Thanks Philip for checking it so fast.
Now stock set back if order is cancelled is OK, that was because that not all the statuses was set in the config page - as you wrote.

But the gaining points problem still not solved... It was true that there was a misspell in 'feladva' status. This means in our language, that 'it is under delivery', it's on it's road to you. So this should be a status just before shipped. (shipped = arrived to you, it's in your hands) But fixing to the correct status name also do not helped.

I've played a lot with the plugin, but anything I gave in the plugin parameter was not working correctly (worked as earlier described), only if the 'confirmed' status was set. In that case (confirmed) it worked like a charm. Please have a look at it again, because I feel myself so retarded, that you can not imagine... You can modify in config the statuses, also in the plugin settings I give you a free hand, please make a test order. System should give the user the points when the status is 'shipped' or 'feladva', and of course it shouldn't remove points from user if the status was not set to 'shipped' or 'feladva' before. That's our case what needs an ASAP solution.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 7 months ago #236856

Hello,

Let's explain simply your actual status configuration :

- Default order status => created : OK
- Unpaid order statuses => confirmed created : Confirmed isn't a paid status ? Why ? That can explain point weird point move.
- Payment confirmed order status => created : First step for being paid is "created", that's contradictory with "Unpaid order statuses", can brings issue too
- Invoice order statuses => confirmed feladva shipped : OK but does this is really usefull? Note, edit an invoice for Unpaid order statuses can be logical and so won't work.
- Cancelled order statuses => cancelled refunded : OK

I suggest you this configuration, an advice made more easy.



Hope this will solve your point issue.

Regards,

Attachments:
Last edit: 8 years 7 months ago by Philip.

Please Log in or Create an account to join the conversation.

Time to create page: 0.097 seconds
Powered by Kunena Forum