Problem with updating a cart just the first time

  • Posts: 48
  • Thank you received: 0
13 years 5 months ago #18302

Hello!

I have a little problem with updating the cart, just the first time a customer opens a checkout (cart) page.

The workflow is:
cart_coupon,login_address_shipping_payment_terms_confirm_fields,end

Just the first time user enter the checout page, he must press Next button twice on the first step to get to the second step.

I found out that if he enters on page "www.../checkout/" and he is not registered he gets the price without shipping value. When he press "Next", the price updates on the cart with a shipping cost, but he is still on the same page (first step). When he press Next button the second time, he gets to next step. This happens just the first time.
If he is registered already, than he gets also the price without shipping cost. But whan he press "Next" he goes to the next step without getting the shipping cost in the cart.
In both cases if he returns to first step (where is the cart), he gets the price with shipping included.

But if he enters the first time directly to "www.../checkout/step/step-0/". He gets the price with shipping cost. And when he press the "Next" button, he gets to the seccond page (step 2) which is "www.../checkout/step/step-1/". In this example it is working fine.

I don't know how to send user directly to "www.../checkout/step/step-0/".
I have a code on button (Buy now) in article which send him directly to checkout:
index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=1

And I use a module mini shopping cart (mod_hikashop_cart) which send a user to "www.../checkout/".


Thanks for you time.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18309

Which version of HikaShop are you using?

Please also do a screenshot of the checkout tab of your configuration so that we can see what options you're using.

Finally, please make sure that the cache plugin of Joomla is deactivated.

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

  • Posts: 48
  • Thank you received: 0
13 years 5 months ago #18367

Thanks for your super-fast reply.
I have the last stable version 1.5.1.

Here is the screenshot of the checkout tab:




The cache-system plugin of Joomla is disabled.
I tried to disable also the cache in global configuration of Joomla 1.5.23 and I cleaned the cache.
Nothing changed.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18422

It seems to indeed be a problem in the way that checkout workflow is handled by HikaShop.
It's not a redirect problem but it's because that case is not handled in the workflow rules in HikaShop. We'll have to work on that to see how we can make it work...

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

  • Posts: 48
  • Thank you received: 0
13 years 5 months ago #18492

Thanks for your discovery.
Can you please warn me when you will solve the problem.

When do you think I can expect you will make this work?

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18495

We worked on it and came up with a solution which seems to work.
Could you try to change the code:
function before_cart(){
return true;
}

by:
function before_cart(){
$config =& hikashop::config();
$auto_select_default = $config->get('auto_select_default',2);
if($auto_select_default){
$this->before_shipping(true);
$this->before_payment(true);
}
return true;
}

in the file components/com_hikashop/controllers/checkout.php and try again ?
That should initialize the payments and shippings on the cart directly, avoiding the problem in such workflow.

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

  • Posts: 48
  • Thank you received: 0
13 years 5 months ago #18585

Nicolas, you are incredible!
I didn't expect you will solve the problem so fast.
It works fine now.

Do I need to manualy change again the code when I will update to next version?
And what about the code in Display tab, it stays unchanged whan I update to the next version?

Thank you very much.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #18597

We will include that code in the next version so you don't have to do anything.

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

  • Posts: 48
  • Thank you received: 0
13 years 5 months ago #18803

Great.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum