Skip to main content

"Pay now" email link error

More
12 years 10 months ago - 12 years 10 months ago #130298 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.
Last edit: 12 years 10 months ago by MumsHealth.

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

More
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)

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

More
12 years 10 months ago #130513 by MumsHealth
-- 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

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

More
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:
Code:
if(!$this->_check()){ return false; }
after:
Code:
function pay(){
in the file components/com_hikashop/controller/order.php and that will fix the problem.
The following user(s) said Thank You: MumsHealth

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

More
12 years 10 months ago #130587 by MumsHealth
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.

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

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

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

More
12 years 10 months ago #130602 by MumsHealth
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).

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

More
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:
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; }
before
Code:
if(empty($order->order_currency_id)){
in the file components/com_hikashop/controller/order.php and that will fix the problem.

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

More
8 years 11 months ago #279590 by serbofleconcepts
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

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

More
8 years 11 months ago #279596 by nicolas
Replied by nicolas on topic "Pay now" email link error
Hi,

You can remove that code:
Code:
$vars['ORDER_SUMMARY'] .= $content;
from the preload version of the order creation notification email.

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

Time to create page: 0.228 seconds
Powered by Kunena Forum