- Posts: 68
- Thank you received: 8
"Pay now" email link error
- MumsHealth
-
Topic Author
- Offline
Less
More
12 years 10 months ago - 12 years 10 months ago #130298
by MumsHealth
"Pay now" email link error was created by MumsHealth
When a user creates an order a creation email is sent to them. This email includes a "Pay now" link. The link works fine if they are logged in to my website but if they are not it comes up with an error message "The payment method could not be found" and instead of redirecting them to a login page it actually creates a blank order! (see attached)
The payment method I am using is paypal.
The payment method I am using is paypal.
Last edit: 12 years 10 months ago by MumsHealth.
Please Log in or Create an account to join the conversation.
12 years 10 months ago #130357
by Xavier
Replied by Xavier on topic "Pay now" email link error
Hi,
Thanks to give us more informations about your environment.
(fill the lines you deleted when you have created this topic)
Thanks to give us more informations about your environment.
(fill the lines you deleted when you have created this topic)
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 10 months ago #130513
by MumsHealth
Replied by MumsHealth on topic "Pay now" email link error
-- url of the page with the problem -- :
mumshealth.com
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : Chrome 30.0.1599.101 m
-- Error-message(debug-mod must be tuned on) -- :
Notice: Trying to get property of non-object in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 154 Notice: Undefined property: stdClass::$order_full_price in /var/www/mumshealth.com/administrator/components/com_awocoupon/helpers/estore/hikashop/giftcerthandler.php on line 94 Notice: Undefined property: stdClass::$cart in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Notice: Trying to get property of non-object in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Notice: Undefined property: stdClass::$order_user_id in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 203 Notice: Undefined property: stdClass::$order_payment_method in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 205 Notice: Undefined property: stdClass::$order_payment_method in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 212
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : Chrome 30.0.1599.101 m
-- Error-message(debug-mod must be tuned on) -- :
Notice: Trying to get property of non-object in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 154 Notice: Undefined property: stdClass::$order_full_price in /var/www/mumshealth.com/administrator/components/com_awocoupon/helpers/estore/hikashop/giftcerthandler.php on line 94 Notice: Undefined property: stdClass::$cart in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Notice: Trying to get property of non-object in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mumshealth.com/administrator/components/com_hikashop/classes/order.php on line 327 Notice: Undefined property: stdClass::$order_user_id in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 203 Notice: Undefined property: stdClass::$order_payment_method in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 205 Notice: Undefined property: stdClass::$order_payment_method in /var/www/vhosts/mumshealth.com/components/com_hikashop/controllers/order.php on line 212
Please Log in or Create an account to join the conversation.
12 years 10 months ago #130555
by nicolas
Replied by nicolas on topic "Pay now" email link error
Hi,
Indeed, that's a case which is not handled properly.
Add the code:
after:
in the file components/com_hikashop/controller/order.php and that will fix the problem.
Indeed, that's a case which is not handled properly.
Add the code:
Code:
if(!$this->_check()){
return false;
}
Code:
function pay(){
The following user(s) said Thank You: MumsHealth
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 10 months ago #130587
by MumsHealth
Replied by MumsHealth on topic "Pay now" email link error
Fixed most of the problems but there are 2 small glitches.
1. The user can still click the pay now link even after they have already paid. I dont want them to get confused and pay twice.
2. If the user clicks the link after their order has been deleted for some reason it still says "no payment method found" and creates a new blank order.
1. The user can still click the pay now link even after they have already paid. I dont want them to get confused and pay twice.
2. If the user clicks the link after their order has been deleted for some reason it still says "no payment method found" and creates a new blank order.
Please Log in or Create an account to join the conversation.
12 years 10 months ago #130597
by nicolas
Replied by nicolas on topic "Pay now" email link error
1. The "pay now" button is only available if the orders are created. Once the orders are confirmed (which normally happens automatically when your payment gateway sends the payment notification to HikaShop), the button should not display anymore.
2. We'll investigate that and fix it for next release but note that you're not supposed to delete orders. It's best practice to cancel them in order to leave a trace.
2. We'll investigate that and fix it for next release but note that you're not supposed to delete orders. It's best practice to cancel them in order to leave a trace.
The following user(s) said Thank You: MumsHealth
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 10 months ago #130602
by MumsHealth
Replied by MumsHealth on topic "Pay now" email link error
1. The problem is that order creation email includes its own "pay now" link. This bypasses the pay now button on the orders page completely and takes them directly to paypal.
2. I don't normally delete customers orders usually just test orders that I've created because I don't want them to clutter up too much. Unlike some European countries Canadian law doesn't care if your invoice numbers are out of order or in any particular order at all (that I know of).
2. I don't normally delete customers orders usually just test orders that I've created because I don't want them to clutter up too much. Unlike some European countries Canadian law doesn't care if your invoice numbers are out of order or in any particular order at all (that I know of).
Please Log in or Create an account to join the conversation.
12 years 10 months ago #130651
by nicolas
Replied by nicolas on topic "Pay now" email link error
1. Ok I though that you were talking about the display of the pay now button on the orders listing page, not about that.
Indeed, we're missing a check here.
Add the code:
before
in the file components/com_hikashop/controller/order.php and that will fix the problem.
Indeed, we're missing a check here.
Add the code:
Code:
$config =& hikashop_config();
$default_status = $config->get('order_created_status','created');
if($order->order_status!=$default_status){
$app =& JFactory::getApplication();
$app->enqueueMessage('The order '.$order->order_number.' cannot be paid anymore.');
parent::listing();
return false;
}
Code:
if(empty($order->order_currency_id)){
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 158
- Thank you received: 5
8 years 11 months ago #279590
by serbofleconcepts
Replied by serbofleconcepts on topic "Pay now" email link error
I can see this thread is a few years old but I am having the same issue on 3.2.0. I went to look for the code on the file above but that part does not exist.
Can you please advise how I can remove the pay now text from the order email.
Thanks
Can you please advise how I can remove the pay now text from the order email.
Thanks
Please Log in or Create an account to join the conversation.
8 years 11 months ago #279596
by nicolas
Replied by nicolas on topic "Pay now" email link error
Hi,
You can remove that code:
from the preload version of the order creation notification email.
You can remove that code:
Code:
$vars['ORDER_SUMMARY'] .= $content;
Please Log in or Create an account to join the conversation.
Time to create page: 0.228 seconds