limit on pay with points

  • Posts: 719
  • Thank you received: 3
10 years 4 months ago #185854

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5.28

Hi,
on "pay with points" plugin i set Specific configuration>minimum value = 20 EUR
So it works and if the order is over 20 Eur i have a payment with points.
The problem come out when i enable the "Active checkout step" on HikaShop User Points plugin.
I mean that when the "Active checkout step" is on YES Hikashop pays with point without the limit of 20 EUR.
Could someone hep me please?


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #185885

Hello,
Can you show me through some screenshots how did you configured your HikaShop User Points plugin so that I can reproduce it on my end ?
Thanks

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

  • Posts: 719
  • Thank you received: 3
10 years 4 months ago #185955

Hi,
yes, here you are.
Thanks to you


my site with Hikashop
www.lacasettabio.it
Attachments:

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 4 months ago #186011

Hi,

I can't reproduce your problem in the way that I don't have the "yes/no" question in the checkout if the order is less than 20 eur.
But I found a problem with the display of the question which does not use the value of the point discount ; so if with the point discount the order total became less than 20 eur, the question is hidden.
For the discount, I don't have the issue you described.

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: 719
  • Thank you received: 3
10 years 4 months ago #186073

Hi Jerome,
i've made some other tests adding the cart on the points page checkout.
So the problem is the shipping cost.
as you can see from my screenshot:
- the order more than 20 EUR is Always ok
- with the order less than 20 EUR, without shipping cost, it is ok
- with the order less than 20 EUR, with shipping cost, you don't see the "yes/no" question but the discount is applied.

On the "pay with point" plugin i set "Shipping" NO and that works fine if i disable the "Active checkout step" on HikaShop User Points plugin


my site with Hikashop
www.lacasettabio.it
Attachments:
Last edit: 10 years 4 months ago by lacasetta.

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 4 months ago #186136

Hi,

Thanks for the details ; it helps !

Can you please edit the file "plugins/hikashoppayment/userpoints/userpoints.php" and replace

	if($this->plugin_params->minimumcost > $total)
		return false;

	if($this->plugin_params->allowshipping == 1)
		$calculatedPrice = $total;
	else
		$calculatedPrice = $total_without_shipping;
By
	if($this->plugin_params->allowshipping == 1)
		$calculatedPrice = $total;
	else
		$calculatedPrice = $total_without_shipping;

	if($this->plugin_params->minimumcost > $calculatedPrice)
		return false;

And also replace
	if(!isset($order->full_total)) {
		$total = $order->order_full_price;
		$total_without_shipping = $total-$order->order_shipping_price;
	} else {
		$total = $order->full_total->prices[0]->price_value_with_tax;
		$total_without_shipping = $order->total->prices[0]->price_value_with_tax;
	}
into
	if(!isset($order->full_total)) {
		$total = $order->order_full_price;
		$total_without_shipping = $total-$order->order_shipping_price;
	} else {
		$total = $order->full_total->prices[0]->price_value_with_tax;
		$total_without_shipping = $order->total->prices[0]->price_value_with_tax;
	}

	if(isset($order->additional['userpoints'])) {
		$total -= $order->additional['userpoints']->price_value;
		if(!isset($order->full_total))
			$total_without_shipping -= $order->additional['userpoints']->price_value;
	}

Thanks to these two modification, it should exclude the shipping price when processing the "minimum cost" check and it will provide a right total without shipping in every cases.

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.
Last edit: 10 years 4 months ago by Jerome.

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

  • Posts: 719
  • Thank you received: 3
10 years 4 months ago #186203

Hi,
i found the first code but i was not been able to find the second one.
Is it on the same file?
I send you my file


my site with Hikashop
www.lacasettabio.it
Attachments:

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 4 months ago #186249

Hi,

Well, in HikaShop 2.3.5, the second block will be an addition.
I modified my previous post.

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: 719
  • Thank you received: 3
10 years 4 months ago #186276

Hi,
with your new first code, on frontend when i login as a user i have the site with 500 error.
Could you check the code please?


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 4 months ago #186280

Hi,

The code looks good and the code I have in my local website is working.
So, you should take a look at your PHP error log ; like usual when you have a 500 error page.

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: 719
  • Thank you received: 3
10 years 4 months ago #186372

Hi, i don't know but I tried it for the fifth time and now there is no error.
Moreover, the problem was solved.
If i understand well this fix will be on the next release, isn't it?
Thanks a lot
Best Regards


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 4 months ago #186410

Hi,

Yes ; I already test and commit my modifications so they will be include in the next release.

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: 719
  • Thank you received: 3
10 years 3 months ago #188610

Hi,
i'm sorry but only today i discovered an issue.
With the plugin "Hikashop UserPoints Payment Plugin" set on virtual coupon
after the purchase the plugin takes the points from AlphaUserPoint and this is ok.
The issue is when the order is payed! After the payment the plugin gives back the points!!!
That is bad :angry:


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #188612

Also i discovered that this issue there is since 29 Settembre 2014 on my site.
:ohmy:


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 3 months ago #188620

Hi,

It is a misconfiguration of setting "Invoice order statuses" in HikaShop or in the setting "valid order statuses" in the plugin (hikashop / userpoints).

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: 719
  • Thank you received: 3
10 years 3 months ago #188737

Hi,
on Invoice order statuses i have shipped
on Valid order statuses i have empty


my site with Hikashop
www.lacasettabio.it

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 3 months ago #188738

Hi,

So please put the list of the order statuses which are targeting a "confirmed/valid" order.
Like: "confirmed,shipped"
If the value is empty, the plugin use the "invoice order statuses" to work ; and if an order change his status for not one of them, the user can regain his points.

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.
The following user(s) said Thank You: lacasetta

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

  • Posts: 719
  • Thank you received: 3
10 years 3 months ago #188858

OK, it works!
Thank you so much.
Best regards


my site with Hikashop
www.lacasettabio.it

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

Time to create page: 0.087 seconds
Powered by Kunena Forum