Continue Shopping Pop-Up

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #125006

Thanks to update to the latest version, the 2.2.1.
This should solve the problem.

The following user(s) said Thank You: aleks59

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #127617

I am having the same issue with ?popup=1 staying in the URL after I add a product to the cart. So when I leave the page and navigate back using the back button of the browser, the popup is showing again.

I'm using Hikashop Essential 2.2.2

Shop in development: www.kvcv.be/index.php/webshop

Last edit: 10 years 7 months ago by yannickv.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #127820

Hi,

Thanks for the report, I have corrected that and it will be available in the next release.
You can edit the file: "component/com_hikashop/controllers/product.php" function "display()" and add the code:

$app->setUserState( HIKASHOP_COMPONENT.'.popup','1');
after:
$url.='popup=1';
(code present twice)

And edit the file: "components/com_hikashop/views/product/view.html.php" and replace:
				$js = $this->getJS();
By:
			if($app->getUserState( HIKASHOP_COMPONENT.'.popup','0')){
				$js = $this->getJS();
				$app->setUserState( HIKASHOP_COMPONENT.'.popup','0');
			}else{
				$js = '';
			}

Last edit: 10 years 7 months ago by Xavier.

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #127902

Hi

In the file components/com_hikashop/views/product/view.html.php the code

$js = $this->getJS();
is present twice.

Should I replace both of them?

Last edit: 10 years 7 months ago by yannickv.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #127936

Hi,

The first one should be enough. The on in the display() function.

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #127958

When I change that, adding a product to the shopping cart results in the following error:

Fatal error: Call to a member function getUserState() on a non-object in /home/kvcv/public_html/components/com_hikashop/views/product/view.html.php on line 25

Line 25 refers to the line
if($app->getUserState( HIKASHOP_COMPONENT.'.popup','0')){
that I added.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #127960

Oups..
You have to add:

$app = JFactory::getApplication();
before that code.

The following user(s) said Thank You: yannickv

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

  • Posts: 13
  • Thank you received: 0
10 years 7 months ago #127970

Thanks, now it's working fine :-)

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

Time to create page: 0.081 seconds
Powered by Kunena Forum