Cart in Hikashop 2.0 does not stay on same page

  • Posts: 121
  • Thank you received: 7
12 years 1 week ago #76593

Since I upgraded to 2.0, the cart module does not stay on the current page after a product is added to it. It goes to an empty page with only the cart displayed. Also when the cart is emptied it goes to the same empty page.

I downgraded to 1.6.0 and the problem is fixed so its definitely a new bug. All settings are exactly the same between versions. And 'after a product is added to the cart' is set to 'always stay on the same page' obviously.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 1 week ago #76894

Hi,

I think that the problem could be due to a view edited on your website.
On my end it's working like a charm, when I add a product to the cart we stay on the same page.

Have you tried with our last version from the website ? Because since the first 2.0 some bugs have been fixed.

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

  • Posts: 121
  • Thank you received: 7
12 years 1 week ago #77079

Hi Xavier,

I don't think I've edited any cart views that I can remember.

I downloaded it again and the version is different than the last download by a few bytes. So I'll try it again and let you know.

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

  • Posts: 121
  • Thank you received: 7
12 years 6 days ago #77815

Hi Xavier,

Today I tested the latest 2.0 download from your site... I still have the same problem.

As I said, I don't think I changed any views that I can remember. Any other ideas? (BTW I reverted back to 1.6.0 again now)

Last edit: 12 years 6 days ago by jeremynsl.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 6 days ago #77911

Hi,

And are you sure that the option in HikaShop > Checkout is still on "Stay on the same page" on something like that ? Try to save it again.
Else, I think that there is a redirection problem in the class "cart".

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

  • Posts: 121
  • Thank you received: 7
11 years 11 months ago #79680

Hi Xavier,

Yes, I'm sure that option is enabled. I changed the option to something else, and back again and I still have the problem.

I also noticed something else. On my 2.0 dashboard I see:
Warning: Invalid argument supplied for foreach() in .../administrator/components/com_hikashop/classes/widget.php on line 1221

I'm not sure if that's relevant or not. You guys gave me a custom widget.php to fix some problems I had with reporting in 1.6. I'm assuming that would be overwritten when I upgrade to 2.0 though.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
11 years 11 months ago #79779

As we don't have the problem on our end, we'll have to look at it on your website or a copy of it.
Would you be able to make a copy of the updated website and provide a backend access to it so that we can look at the problem ?

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

  • Posts: 121
  • Thank you received: 7
11 years 11 months ago #79836

Hi Nicolas,

I can copy over all the website files to a new URL. But I think that they would still share the same php database. I don't know how to deal with that.

How about I give you SU access, and you can install 2.0? Once you see the problem, reinstall 1.6 for me so everything is back to normal.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #79973

Hi,

We prefer to do that on a copy, for the files, you can do that by ftp, and for the database you can export your current database and import it in a new database.
Then just change the settings in the config file of Joomla to change the database path.

If you can't do that, thanks to give us the SU access.

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

  • Posts: 121
  • Thank you received: 7
11 years 10 months ago #86186

Hi,

I'm sorry this took so long but I had to learn how to properly mirror my site. In the end I used Akeeba backup for the task.

So, now its done and the problem remains with 2.0. You can see it easily.

2.0 is installed to viraloutbreak.net

1.6 is installed to nucleus-soundlab.com

The ONLY difference is the 2.0 install. I have done nothing else to the nslmirror site. Now you can see the problem by going to any product page such as:
viraloutbreak.net/products/refills/new-a...llerhead-reason.html

Add the product to your cart. Then remove the product from your cart. Both actions causes Hikashop to change to a blank page. Try the same operations here:
www.nucleus-soundlab.com/products/refill...llerhead-reason.html

There are no problems with 1.6. Please help me get this fixed! Thanks,

Jeremy

Last edit: 11 years 10 months ago by jeremynsl.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #86320

Hi,

I think that the problem come from the return_url which is different than the base url of your website, example if the return url has "www" inside, and it's not present in the base url of your website, so hikashop don't do the redirection correctly.

Try to see in the controller product (components/com_hikashop/controllers/product.php) at the line

if(strpos($url,HIKASHOP_LIVE)===false && preg_match('#^https?://.*#',$url)) return false;
if it return false.

If yes, check is the function "strpos" return false. if it return false, that's because the both start of url are different.

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

  • Posts: 121
  • Thank you received: 7
11 years 10 months ago #86449

Hi Xavier,

Thanks for the reply but I don't really understand what you are asking.

Yes, in the file you ask for I do have the line below:

if(strpos($url,HIKASHOP_LIVE)===false && preg_match('#^https?://.*#',$url)) return false;

But I don't know how to check whether it 'returns false'. Or how to check whether the function strpos returns false. I don't have that much php knowledge.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #86488

Hi,

To test it, you can use this code:

var_dump($url);
var_dump(HIKASHOP_LIVE);
exit;
Use it just before the previous line, and on the frontend remove a product from the cart, a white page with two line should be displayed, check if the first part of the url is the same as the other url.
It must be exactly the same.

Have you changed you website url ? By adding for example "www" before the domain ? Check in the configuration.php file in the joomla files if the url is the same as the one used in the browser.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum