userpoints not deducting from altauserpoints

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 10 months ago #285949

-- url of the page with the problem -- : not publicly available
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.3
-- PHP version -- : 7.1.11
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : none

After getting the checkout working properly with userpoints plugin (see www.hikashop.com/forum/payment-methods/8...ublished.html#285948 )

We now have another problem with getting this whole thing working.

The checkout works fine EXCEPT no points are ever deducted from the user's AltaUserPoints account.

Any ideas why this is happening (or not happening)?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 10 months ago #285950

Hello,

An actual screenshot of your user point payment plugin would be required.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 10 months ago #286020

Here are the screen shots of the settings

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 10 months ago #286086

Hello,

I can see that you have activated the checkout "user points" block.
But you also have settings to ask the customer if he wants to use its points and by default the points are not used.

What would be interesting is to know if you have correctly added the block in your workflow and if you're using that block to ask for the usage of points.
At that moment you will see directly in the checkout cart ; long before the order creation ; if you will use points.

Since we do not have information or details regarding that points, we don't know if you see any discount ; we can't know if you're using points.
Because by default, it looks like the system is set-up to not use points ; so it would be logical that points are not used and deduced.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 10 months ago #286100

The configurations there are set so that the points are not used 'by default' - the user must indicate that they want to use the points for them to be used.

The checkout flow is working properly.
You can see the checkout workflow in the attached configuration screen shot.
You can also see that the entire process for checkout appears to be working properly in the video here:
youtu.be/TMuTK5rEgQE

However, it appears that somewhere in the code it is not properly calling the AUP API to deduct the points as indicated.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 10 months ago #286101

Ooops forgot to attach the config screen shot

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 10 months ago #286104

Hello,

Can you please check the order content in your database (via PHPMyAdmin or similar) in order to extract the content that you will find in the column : order_payment_params.
It would also be interesting to know what is your HikaShop build number (extra information with the version) so we can be sure of the patches you have.
www.hikashop.com/support/documentation/5...onfig.html#main_main

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286639

We presently have:
HikaShop Business 3.2.2 [1801150943]

Here's what is listed in the order_payment_params of an order that was place for $6 total an $6.00 points used:

O:8:"stdClass":1:{s:10:"userpoints";O:8:"stdClass":4:{s:10:"use_points";i:6;s:11:"earn_points";a:0:{}s:8:"use_mode";s:3:"aup";s:9:"give_back";b:1;}}

Attached is a screen shot of the order view from the admin-side of this order.

Attachments:

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286640

I did some looking in the plugins\hikashoppayment\userpoints.php file (where it appears all the userpoints functions are for point 'processing' for HS) and although I see it loading the AltaUserPoints API in that file, I don't see any of the standard AltaUserPoints API syntax (esp AltaUserPointsHelper::newpoints) to actually subtract the points.

So I'm not sure that this functionality has really been added - unless it is in some other file somewhere.

NOTE: I have confirmed that there IS a rule in AltaUserPoints called "Order_validation" (and i is published), so that isn't a problem. Although the description of that rule says "Give points to customer when the order is validate" - which seems to imply that this part of that file is possibly not deleting points that were used, but instead, only handling when points are AWARDED based on a purchase.

Is this actually working for AltaUserPoints for anyone else - or is it just me that is having this issue?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286658

Hi,

I can confirm that this is working for AltaUserPoints.
The API of AltaUserPoints is backward compatible with AlphaUserPoints.
So it's possible to use AlphaUserPointsHelper's functions with AltaUserPoints as long as you have a bridge for the class name, which is what we do with the userpoints_aup_compat.php plugin.
So the problem is not here.

Could you provide a screenshot of the menu System>Order statuses (as they influence when and why the points are taken/given), and the settings of the user plugins in the menu System>Plugins ?

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286694

Attached is that screen shot

Attachments:

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286696

Also (if it matters, esp. related to the status/workflow of orders) - we are using HS for physical products which are manually delivered. We manually set the status to "delivered" (via Joomla/HS admin) when the product has been delivered.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286704

Hi,

Unfortunately, that's not the screenshot I asked about.

Could you provide a screenshot of the menu System>Order statuses (as they influence when and why the points are taken/given), and the settings of the user plugins in the menu System>Plugins ?

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286738

Sorry, somehow I grabbed the wrong screen shot.

Here are the ones you requested.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286825

Hi,

I was talking about the settings of the user points plugin in the menu System>Plugins, not the settings of the payment user points method in the menu System>Payment methods.
Could you provide the correct screenshot please ?

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #286826

Here it is

Attachments:

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287145

It's been several days since I posted the screen shots, and quite a bit of time since initially reporting this.

Is there any chance we get get this figured out this week?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287186

Hello,

I'm afraid that it's not possible to see anything with your screenshot since it's too small and it's all blurry.
So unfortunately, without it we can't go further.

Regarding your order status configuration ; you have some errors.
"created" should not be listed as an "invoice" order status ; but "shipped" and "delivered" must be (regarding what you said).

Since it looks like very difficult to get information from your configuration and you do not understand each time what we're talking about ; I can potentially have a look at your website. But as you will understand, the solution won't be solve this week.
You can provide us some admin access via the "contact us" form including an URL for that forum thread so the support team will understand what to do with the credentials.

If you can also provide order number that you used for your tests and maybe a front-end test account to perform a test ; it would be very helpful.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
6 years 9 months ago #287190

I've sent the required info via contact form.

I've adjusted the order status configuration; however, I've never changed any settings there myself. And the changes didn't appear to have any effect on the problem.

I will wait to hear back from your support team.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287306

Hello,

See : pasteboard.co/H6fctGc.png

I'm wondering why the "unique function name" which is added by the plugin with the name "plgaup_orderValidation" has the name "plgaup_orderValidation_tlp" in your website.
Since that functions name is used by the plugins to add or remove the points ; if the function can't be found, it cannot work.

I changed the function name in your AltaUserPoints configuration ; it should work better with a correct rule set !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum