current points earned and spent configuration

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #228797

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.8.4
-- PHP version -- : 5.5.3

Hi,

I finally configured the userpoint plugin close to the way i want, but i still have an issue with the points. It seems that the points spent and earned are based on the price after tax rather than before. i have long having an issue with the product price as it always appears with tax. I have a few questions below.

1. How can i configure the points to calculate on product price before tax?
2. If i used Hikashop user point instead of Alphauserpoints. can i have the point displayed on the front page too
3. can i set expiry date on points earned.

I have attached the print screens of the configurations hopefully you can find out the issue.

Regards,

Gary

Attachments:

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

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #228805

Also, can i restrict the points to be used on certain categories? i don't seem to find the configuration.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 9 months ago #228920

Hi,

1. There is no setting to use untaxed prices instead of taxed prices. It would require the modification of the code in the function getPointsEarned of the file plugins/hikashop/userpoints/userpoints.php in order to use the prices without taxes.

2. There is also no setting to display that value.
However, it should be easy to add pretty much in any view of the frontend with such code:
$user = hikashop_loadUser(true);
echo $user->user_points;

3. There is no such system. That would be quite complex to add as the system isn't made for that. But maybe AlphaUserPoints has a system for their points ? If they do, then you could could use the user points system with them to do that.

4. There is also no option to limit the points gains to only some categories of products.
That could be added to the points caluclations in the getPointsEarned function like in point 1.

Edit Jerome The setting "product categories" allow to filter the products of the selected categories. The settings "Rates" and "Product points" will then only related to the products in the categories you choose.

Last edit: 8 years 9 months ago by Jerome. Reason: Correction on point 4

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

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #228951

Hi Nicolas,

Thank you for your reply. I am surprised by your answer 4.

Let me explain by example: I have 5 categories in which only category 1 that customer can earn points from. The setting can be configured in the Hikashop user point plugin. When the customer wants to spend the points as discount with an order, he or she can only apply the points to category 1 which i believe it is very logical. However, if your answer to question 4 is right, that means i have to allow the points to be used against all categories. customer earns points from Category 1 and can spend points as discount on Category 1-5 which is not good. I have read the post from Hikashop forum saying that i may be able to use warehouse/shipping method to control the way customer spends the point, is it true.

For answer number 1, i am surprised too as we are in Canada that all prices displayed are tax excluded, and all discounts should be deducted before tax.


Regards,

Gary

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 9 months ago #228984

Hi,

Regarding question 4, I was mistaking. Jerome corrected my answer above.

Regarding question 1: Yes, discounts. But we're not talking about discounts here. We're talking about points. So the law regarding the taxes and discounts doesn't apply to it. Also, we come from Europe and here you have to display prices with taxes and thus it's more logical to base yourself on the price with tax for the calculation of the points.

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

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #229072

Hi,

Regarding the answer by Jerome, i think he is referring to the plugin for earning points and I am talking about the Hikashop userpoint payment plugin for payment method, it doesn't come with a configuration to set point payment by categories (please see the attached pic)
Yes, there is a setting of product categories which allow to filter the products of the selected categories in earning points but there is no just setting in the payment plugin.

I really need this feature and i believe it should be there otherwise i can't use this point system even though i have it set 90% right. Is there an alternative except for modification? if modification is necessary so which file is it and how to do it?

For answer one, may be i can base myself on the price with tax for the calculation of the points. how about my attached pic hikauser_point_1.jpg, where is the setting to have it set to tax excluded.

Regards,

Gary

Attachments:

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 9 months ago #229146

Hi,

1. Ah yes, I was also thinking that you were talking about points gains. For the use of the points to be restricted to only some categories, the ideal solution would be to have a generic solution to limit payment methods to categories of products. The problem with that is that you can't have several payment methods for different categories for an order so it's quite limiting because the system would then often display to the customer that he can't purchase finish the order because he has products from categories with different payment methods attached.
So no, there is no solution in that case with the options available. But it could be added quite easily to the user points payment plugin with a small modification of the code.
In the file plugins/hikashoppayment/userpoints/userpoints.php in the function onPaymentDisplay, you could add a check on the categories of the products (that you can find in the array $order->products). Just return before the call to parent::onPaymentDisplay($order, $ordered_methods, $usable_methods); when there is at least a product from a category for which you can't pay with points and that will remove all the user points payment methods from the selection of the payment methods.

2. I don't understand your question. In your hikauser_point_1.jpg I see a product on a listing of products. Where is the link with the points ? If you want to have that price displayed as untaxed, edit your menu item via the Joomla menu manager, and in the "products options" tab, turn off the "show taxed prices" setting.

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

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #229339

Hi Nicolas,

I see, so basically you are telling me to add a check in the userpoints.php so that when a product that can't be paid with point is added in the cart, the point payment option simply won't show up. Not an ideal solution but i may live with it, Can you show me the code? does it start with something like that foreach($order->products as $product); I may also need to alter the view/cart file so that when the point payment option does not appear, i need to tell the customer what to do next.

Thanks,

Gary

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 9 months ago #229541

Hi,

I'm afraid that we cannot provide you such code.
Our support team can provide fixes, development tips...
Your current request is not something that we can made in a few minutes, it will require several hours of development regarding the plugin "user points" and all of his possibilities (virtual coupon, payment method, coupon generation...).

The tip that Nicolas gave you is one possible solution but I'm really not fan of it because I know that it can generate side effects if you're not using the right mode.
And because you're currently in "virtual coupon" mode, it is not the right solution.

Modifying the payment plugin "user points" is the only option to add new features.
In your case you have to change the way that the discount points are processed in order to exclude the unwanted products from the total.
Like I wrote just before, it is not something which can be done here by the HikaShop support team and it requires a specific development.

For information about development on HikaShop, there is that documentation :
www.hikashop.com/support/documentation/6...r-documentation.html
If you think that you do not have the skills to perform such kind of modification, I can suggest you the "commercial jobs" forum section.
www.hikashop.com/forum/9-commercial-jobs.html
You can also see to contact the HikaShop team thanks to the "contact us" form or to contact some of the HikaShop partners.

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: 42
  • Thank you received: 0
8 years 9 months ago #229739

Hi Jerome,

Ok, so there is no way i can use the userpoint payment plugin the way i want without doing some modifications. Nice plugin but i think i need to give it up for now. However, Is there at least a way I can show the client 1) how many point they have in the check out? ( I am currently using Alphauserpoint, i know displaying Hikashop user point is very easy). 2) in the frontend/view/cart.php, can you show me how to come up with a subtotal of the products in a category in the cart? i can use this information to calculate the earned points of the order and how many points can be used. I just need to echo the information on display no need to store in the database.

Regards,

Gary

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

  • Posts: 42
  • Thank you received: 0
8 years 9 months ago #229763

Also, can i display the last order date in the checkout?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 9 months ago #229834

Hi,

1) Please see that documentation page for the "checkout" settings :
www.hikashop.com/support/documentation/257-using-points.html

2) I'm sorry, like that, I can't.
2.1 - In the cart view. No.

3) Sure you can do a lot of things with some custom views.
But your question is a little far from the original subject of that thread.

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: 42
  • Thank you received: 0
8 years 9 months ago #230284

Hi,

1. This documentation helps if I use user point custom field by inserting $user = hikashop_loadUser(true);
echo $user->user_points in the checkout/cart.php file; but how about if i use Alphauserpoint and want to display the points in the view/checkout/cart.php

2. I did figure out how to calculate and display the category subtotal in the checkout screen.

Gary

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 8 months ago #231369

Hi,

1. You should ask AlphaUserPoints support for that. Try something like that:

$user = JFactory::getUser();
$userInfo = AlphaUserPointsHelper::getUserInfo('', $user->id);
echo $userInfo->points;

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

  • Posts: 42
  • Thank you received: 0
8 years 8 months ago #231430

I have figured it out. Thank you

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

  • Posts: 42
  • Thank you received: 0
8 years 8 months ago #231674

Hi,

In conclusion, I still strongly believe that the feature of spending points on selected categories should be a standard feature in your point system, allowing point earning on specific categories but not for point spending is not logically correct. Let me demonstrate it using a very simple example, If I sell airline tickets, Air France offers points which customer can use for future flight discount. Air Canada and British Airline do not offer and accept points. Based on the concept of your point system which does not distinguish which airlines and it allows the customer to use the points on the other airlines. Of course, the user is happy that he or she can use the points for any airlines but the approach is not ideal for Air France and the store owner.

I have approached a commercial developer about doing this modification, but the cost is just too high and I don't know if I can get the right result. As the Alphauserpoints has removed itself and phased out, I believe your team should put some effort to improve the point system so that it will still remain useful.

Anyway, thank you for your help for the other aspects of the problem and I hope I could see the improvement of the point system in the near future release.

Regards,

Gary

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 8 months ago #231681

Hi,

Thank you for your feedback. We'll take it into account for future improvements of the points system.

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

Time to create page: 0.102 seconds
Powered by Kunena Forum