change the target of " continue shopping"

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205275

-- HikaShop version -- : 2.4.1
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.5
-- Browser(s) name and version -- : firefox 38.05

Dear Sir:
This problem bothers me for a long time.
During the checkout process, when i click the "continue shopping" button, it must be returned to a certain page preset in the configuration area. This makes the shopping process start from the beginning. ( for example, in my case, i set the url to the root category list, and the customers have to begin from the list, not the products they have selected before checkout.). Any way to let the "continue shopping" button to go to the last page they visited before checkout ?
Please help me for that . thanks.

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
9 years 5 months ago #205280

Hello,
The "Continue shopping button's URL" option will only enable you to set a static URL where you'll redirect your customers, if you want to dynamically change that value regarding from where your customer was coming, the solution will be to use some code customization

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205306

Please tell me how to modify the codes. I tried myself before, but failed.
I need this change desperately.
Thanks in advance.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #205317

Hi,

In the view "checkout / step" you can replace the code:

echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($this->continueShopping),'window.location=\''.JRoute::_($this->continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
By:
?>
<a rel="nofollow" class="hikashop_cart_button" id="hikashop_checkout_shopping_button" href="#" onclick="window.history.back();"><?php echo JText::_('CONTINUE_SHOPPING'); ?></a>
<?php
For example, this will allow the customer to go to the page he is coming from.

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205378

I changed the code as you suggested, but no luck. It still jump to the top of the page, not stay in the position of cart module. Any idea ? You can try it , i have changed the code already.

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205383

Sorry, the previous reply is wrong. Please see this one:

I have changed the code as you suggested, but it works in step 1, because it returned to the previous product page, but when i click the continue-shopping button in step2 and step3 and even step 4, it went back to the previous step, but not the latest product page i have visited. that is not what i wanted. I wish customers can go back to the last shopping page, but not any checkout step pages .......

Wish you can help me for that ..
thanks

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #205385

Hi,

I just tried on your website and I am well redirected back to the previous page.
So I have maybe not correctly understood what you are looking for..

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205481

Dear Sir:
1. please try to click the "continue shopping" button on step2 or step3 pages of checkout. ( such as www.harmonyfarm.com.tw/orders/cyber-orde...out/step/step-2.html ), the problem will appear. It can not return to the last page where customers add their products. ( even you click the button in step-1, it returned to step-0, but not the last page where customers add their products.)
2. there appeared another problem after changing the code: after a customer input their username and password, the following message appeared : "Catchable fatal error: Object of class stdClass could not be converted to string in /home/dalusoha/public_html/harmonyfarm/administrator/components/com_hikashop/classes/field.php on line 718"
Please try with the possible login data: username: test; password:test
Thanks

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 5 months ago #205500

Hi,

1. The modification will make the button return to the previous page. That's all. Not return to the last listing page. To have it return to the last page before the checkout change that code to:

echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,$_SESSION['previous_url'],'window.location=\''.$_SESSION['previous_url'].'\';return false;','id="hikashop_checkout_shopping_button"');
and then edit the files "show" and "listing" of the view "product" via the menu Display>Views and add that line at the beginning:
<?php $_SESSION['previous_url'] = hikashop_currentURL(); ?>


2. This has nothing to do with the modification. Update your HikaShop and that should solve the error.

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205550

now it works well but
"Catchable fatal error: Object of class stdClass could not be converted to string in /home/dalusoha/public_html/harmonyfarm/administrator/components/com_hikashop/classes/field.php on line 718"
this keeps happening when i log in.
You said it is a problem of upgrade. But i just bought Hikashop business version 2.4.1, i am not sure if i still need to pay again for upgrade.... Please tell me how to upgrade with a most "economical way"
Thanks

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

  • Posts: 31
  • Thank you received: 0
9 years 5 months ago #205555

"You have the latest stable version of HikaShop Business: 2.4.0"
This is the information i got from my hikashop backend. I still need to upgrade ?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 5 months ago #205568

Hi,

We didn't release any version 2.4.1.
The version 2.5.0 is not released for updates yet (we just released it).
You can download it manually via the menu My account>My subscriptions, and installing it on your website will run the update process.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum