Skip to main content

How do I make WorldPay show up before login

More
14 years 1 month ago #66901 by SteveEvans
I have Hikashop working and correctly configured with WorldPay, tested etc... Everything fine.

Apart from my client wants the payment option 'WorldPay' to show up on the list of payment methods before the user has registered or signed in.

At present, until you sign in, WorldPay doesn't show up as a payment method.

Don't get me wrong, they will still have to register/sign in to complete their order. It would just be nice to see it listed before they sign in.

Is it possible to change this?

Thanks in advance if anyone can help.

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

More
14 years 1 month ago #66912 by jrod
in Configuration/Checkout there's the area of the workflow. can you do a screen shot of your checkout workflow?

to see if you have one step or multi step checkout setup
The following user(s) said Thank You: Mohamed Thelji

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

More
14 years 1 month ago #66915 by Mohamed Thelji
Hi,

I think that you should :
- Go to "Hikashop->System->Configuration->Checkout"
- Edit your "checkout workflow"
- Set your login option after or in the same step as your payment option

Hope this will help you.

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

More
14 years 1 month ago #66921 by SteveEvans
Thanks,

Here is the screen grab. Maybe I am not understanding how the checkout workflow works, but I believe i have login after the payment option. My other payment option (pay by cheque) appears before the user is logged in.

Steve

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

More
14 years 1 month ago #66933 by jrod
it seems you understand how the checkout workflow works ;)

you do have payment in a step before login.

since your other payment methods show up before the user logs in then either

a) the WorldPay payment plugin is assigned to zones. Delete those associated zones, or
b) WorldPay does not show until it knows which country the user is in, which can not happen until the user logs in.

I suspect it is b......

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

More
14 years 1 month ago #66934 by SteveEvans
Hi jrod,

Thanks - and yes WorldPay is not assigned to any zones, so I think it is b. / something in the WorldPay plugin.

Strangely, pay by cheque is assigned to a zone (UK only) and yet this does appear before the system knows the zone (ie before login).

Maybe Nicolas can shed some light on this?

Steve

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

More
14 years 1 month ago - 14 years 1 month ago #66943 by Mohamed Thelji
I checked the Worldpay code, and your worldpay payment methode won't show up before you logged in if you have set a payment zone, AND you should edit your worldpay payment method and change the line :
Code:
function onPaymentDisplay(&$order,&$methods,&$usable_methods){ if (!$this->isShippingValid(@$order->shipping)) return false; if (empty($order->total)) return false; if (empty($methods)) return false; $user = hikashop::loadUser(true); if (!$user) return false;
by this line
Code:
function onPaymentDisplay(&$order,&$methods,&$usable_methods){ if (!$this->isShippingValid(@$order->shipping)) return false; if (empty($order->total)) return false; if (empty($methods)) return false; $user = hikashop::loadUser(true); //if (!$user) return false;
Last edit: 14 years 1 month ago by Mohamed Thelji.

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

More
14 years 1 month ago #66946 by SteveEvans
Thank you Mohamed,

No payment zone is set for WorldPay, so I need to edit the code

Where do I find this code?

Thank you,

Steve

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

More
14 years 1 month ago #66948 by Mohamed Thelji
You'll find this code through the file "'Your hikashop'\plugins\hikashoppayment\bf_rbsglobalgateway\bf_rbsglobalgateway.php"
The following user(s) said Thank You: SteveEvans

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

More
14 years 1 month ago #67067 by SteveEvans
Sorry Mohamed but this doesn't solve the problem.

Just to confirm, the WorldPay payment method has no zone assigned.

Steve

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

More
14 years 1 month ago #67124 by SteveEvans
OK - just to be clear, editing the code like Mohamed suggests does not allow WorldPay to show up as a payment option before the user has registered / logged in.
:(
Steve

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

More
14 years 1 month ago - 14 years 4 weeks ago #67216 by nicolas
Hi,

The modification that Mohamed proposed is fine. However, he told you to modify it in plugins\hikashoppayment\bf_rbsglobalgateway\bf_rbsglobalgateway.php
That file is for the WorldPay Global Gateway.
Are you sure that you're using the Global Gateway and not the Business Gateway ? If not, then you should edit that file and do the same modification:
plugins\hikashoppayment\bf_rbsbusinessgateway\bf_rbsbusinessgateway.php
Last edit: 14 years 4 weeks ago by nicolas.
The following user(s) said Thank You: SteveEvans

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

More
14 years 4 weeks ago #68236 by SteveEvans
Thank you Nicolas,

Yes I can confirm that this works although for anyone else trying to do this the path that Nicolas gives is still wrong.

It is in plugins/hikashoppayment/bf_rbsbusinessgateway/bf_rbsbusinessgateway.php

Thanks again.
The following user(s) said Thank You: nicolas

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

More
13 years 8 months ago #89969 by SteveEvans
I've recently upgraded Hikashop to the latest version (com_hikashop_business_2.1.0_2013-02-12.tar.gz) and once again this problem has re-occured.

Fine - I figure the code has been over-written. I just need to change it again...

But when I look at /home/mywebsite/public_html/plugins/hikashoppayment/bf_rbsbusinessgateway/bf_rbsbusinessgateway.php the code for the function onPaymentDisplay has changed from the fix given by Mohamed.

I now have:
Code:
function onPaymentDisplay(&$order,&$methods,&$usable_methods){ if (!$this->isShippingValid(@$order->shipping)) return false; if (empty($order->total)) return false; if (empty($methods)) return false; $user = hikashop::loadUser(true); $found = false; foreach($methods as $method){ if($method->payment_type!='bf_rbsbusinessgateway') continue; if ($method->payment_params->testMode) { if (isset($user->user_tester)) { if (@$user->user_tester != 'Y') continue; } } else if (@$user->user_tester == 'Y') continue; if(!@$method->payment_params->displayForGuests){ if (!$user) continue; } if (!$method->enabled) continue; if(!empty($method->payment_zone_namekey)){ $zoneClass=hikashop::get('class.zone'); $zones = $zoneClass->getOrderZones($order); if(!in_array($method->payment_zone_namekey,$zones)) continue; } $currencyClass = hikashop::get('class.currency'); $null=null; $currency_id = intval(@$order->total->prices[0]->price_currency_id); $currency = $currencyClass->getCurrencies($currency_id,$null); if(!empty($currency) && !in_array(@$currency[$currency_id]->currency_code,$this->accepted_currencies)){ continue; } $usable_methods[$method->ordering]=$method; $found = true; } return $found; }

What do I need to change to get WorldPay to show up as an option before someone logs on like before?

Thanks,
Steve

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

More
13 years 8 months ago #90046 by Xavier
Hi,

You should have an option for the guest users, see in the plugin options if you can enable something which look like "display for guests"
The following user(s) said Thank You: SteveEvans

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

More
13 years 8 months ago #90083 by SteveEvans
Yes - I can confirm that works.

Many thanks
Steve

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

Time to create page: 0.226 seconds
Powered by Kunena Forum