Checkout steps - old versions versus new version

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
7 years 5 months ago #270614

-- url of the page with the problem -- : private
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.7.2
-- PHP version -- : 7.1.4
-- Browser(s) name and version -- : Safari 10.1.1

We've created a payment plugin that worked on HikaShop versions prior to 3.x. On 3.x there seems to have been changes made to how checkout steps are arranged in the $view object. In previous versions it was $view->step for the current step and $view->steps for the array of steps. Now it seems it is $view->step or $view->workflow_step for the current step (although these are not the same value) and $view->checkoutHelper->checkout_workflow... for the array of tasks within each step.

Is there a way to gracefully support pre 3.x versions AND current 3.x+ versions? Is there any sort of guide map on how best to handle this. Certainly I'd prefer to just say this payment plugin version supports only versions 3 and above, but I've not sure I'll have that option.

Thanks.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #270617

Hello,

For the integration plugin we made, I added the support of HikaShop 3 and I create some function to support the legacy mode (so, the old code in the plugin).

In order to know which mode you have to use, best is to use

$config = hikashop_config();
$checkout_legacy = (int)$config->get('checkout_legacy', 0);
if($checkout_legacy)
   return $this->myLegacyFunction($param1, $param2);

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: 195
  • Thank you received: 13
  • Hikashop Business
7 years 5 months ago #270680

Is there any documentation on $view or other object parameters that were specifically added for the new checkout? And any differences in behavior, new/depricated/altered events, etc? That would be really helpful.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
The following user(s) said Thank You: PolishedGeek

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #270685

Hi,

There is no documentation on all that.
The best we have is this ( www.hikashop.com/home/blog/367-hikashop-...out.html#developpers ) but it's not much and won't help you.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
7 years 5 months ago #270788

For reference I can see there are three options now that we have to check if we want to support pre-3.x versions.

1) is legacy mode set
2) is legacy mode not set (new checkout)
3) does legacy mode not exist (pre-3.x version)


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 7 years 5 months ago by 3by400.

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

  • Posts: 26
  • Thank you received: 0
7 years 5 months ago #270834

i don't understand what to do.
I have now checkout legacy and when you put your address in and than use the button next, its always going back to the same page for put your address in.

it stays stuck in ckeckout step 1.

any idea??
Regards Joeri

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #270789

Hi,

@3by400 :
The legacy option was added in the 3.0.0.
You can find it under the "advanced" tab of the HikaShop configuration and its name is "checkout legacy".
If you don't see it, then either you don't have a 3.x version, or you have some view overrides of the configuration page preventing you from seeing the new options.

There are no version of HikaShop 3 without the legacy setting. Also, with the legacy setting activated, the checkout should behave the same as with the HikaShop 2 checkout.

@Joeri :
Hard to say. It probably means that something is missing.
For example, the VAT number is invalid, or there are no shipping methods, etc.
Sometimes, error messages are not displayed by the template with the old checkout :
www.hikashop.com/support/documentation/6...tibility-issues.html
So it could be why you don't see the error message which would help you understand what's going on.
If you turn off the "checkout legacy" setting, does it work fine ?

Last edit: 7 years 5 months ago by nicolas.

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

  • Posts: 26
  • Thank you received: 0
7 years 5 months ago #270861

Hi Nicolas,

Thanks for your reply.
turn off the "checkout legacy" setting is a solution, then it works.
Some css is gone.
I try it for now and fix some little changes.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 5 months ago #270866

Hello,

You can use the "style / default" if you want to retrieve the CSS from HikaShop 2.6
And you need to use the "frontend / default" if you want to be sure to have all CSS for HikaShop 3
www.hikashop.com/support/documentation/5...fig.html#display_css

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: PolishedGeek

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

Time to create page: 0.079 seconds
Powered by Kunena Forum