Hide Basket while shopping

  • Posts: 87
  • Thank you received: 10
14 years 2 days ago #2043

Hello Nicolas,
Hallo Forum,

easy sunday question.
What is the smartes way to hide the basket when we are in the Checkout process?

Cheers
Gabor
H6

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
14 years 2 days ago #2044

Hi,

Using the jomla menu/module system it's a bit tricky... You should create a menu linking to the checkout. Then, in the cart module joomla options, restrict the module display to the pages where you need it excluding the checkout page. and then modify the file cart of the view product to force the itemid in the action of the form so that it goes to the checkout itemid page. Not so easy...

Otherwise, you could edit the file cart of the view product in the HikaShop menu "Display->Views" and add a check like this :

if(JRequest::getVar('option','')=='com_hikashop' && JRequest::getVar('ctrl')=='checkout'){
  // display nothing on the checkout
}else{
  // display the normal cart page
}

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

  • Posts: 87
  • Thank you received: 10
14 years 2 days ago #2052

ok....second version sounds good.....
Thx

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

  • Posts: 50
  • Thank you received: 0
13 years 11 months ago #2788

But none of them seams to work for me. Is there an other way? I have moved the shoping cart to the bottom. But it is still confusing on the check-out-page to have two shoping carts...

Last edit: 13 years 11 months ago by weting.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2789

The second version will definitely work. Could you post your modifications to the cart file so that we can look at how you did it ?

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

  • Posts: 50
  • Thank you received: 0
13 years 11 months ago #2790

Tried to but it in the beginning and in the end of the file. No difference. Where should it go?

Now I see. I was in the wrong file first time. I will try again.

Last edit: 13 years 11 months ago by weting.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2792

You can just put that code in there "as is". You need to put the content of the file in the "else" statement of the code I posted above. Otherwise, it doesn't do nothing.

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

  • Posts: 50
  • Thank you received: 0
13 years 11 months ago #2793

I guess this is too much programming for me.

I need a more exact instruction to make it work. Otherwhise I am just guessing...

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2795

Please download the file enclosed, copy its content and paste it in the cart file instead of the whole code and that will do it.

File Attachment:

File Name: modified_cart.txt
File Size:5 KB

Attachments:

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

  • Posts: 50
  • Thank you received: 0
13 years 11 months ago #2796

Great :)

Thanks!

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

  • Posts: 37
  • Thank you received: 0
13 years 10 months ago #5613

Hi,

I am using the cart module in my sidebar - I want to do the same, hide the cart module when on the checkout pages. I have added this code and it works well to hide the module, except I still have the header of the module displaying (Saying "Your Cart") is there a way I can hide this too? It looks a bit silly having the header displayed with nothing underneath.

Also, I would like to hide the cart module if the users cart is empty too - is there an easy way to do this? May I also suggest this as an optional feature for the module (Tienda has this option).

Thanks in advance
Simon

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 10 months ago #5618

Hi,

That is an old post and the code of the cart must have changed a lot since one month and a half.
You should do differently now:
Set the option "force a menu on the checkout" to one of your menus, in the config under the tab display and then edit your cart module's joomla options to not be displayed on that particular menu. You won't get the title and you don't have to edit any code.

Concerning the possibility to remove the cart when it is empty, it's the first time someone ask us so we don't have yet a solution to do it easily. What you can do is edit the translation file in the config under the tab languages to remove the text displayed when the cart is empty. But the title will be displayed. We will look at such an option in the future.

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

  • Posts: 37
  • Thank you received: 0
13 years 10 months ago #5633

I may have misunderstood this - but I only want the "shop" menu item highlighted during the checkout process, I don't want any other menu displayed.

Simon

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 10 months ago #5635

You can create a menu attached to a main menu which isn't displayed by your template so that no menus are selected when this menu is forced on the checkout.

Now, if you want to have the shop menu selected and the module not displayed, you should do it differently.

You could create a new position in your template index.php which would not be displayed on the checkout and attach the cart module to that position of your template.
docs.joomla.org/How_do_you_add_a_new_template_position%3F

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

  • Posts: 37
  • Thank you received: 0
13 years 10 months ago #5643

Creating a new module position etc seems a little excessive to do this so I have done the following;

1. Created a menu item under my main "shop" menu called "Checkout Now" which just links to the checkout.
2. Ensured that the cart module wasn't enabled for this menu item
3. Forced the "Checkout Now" menu item to be displayed on the checkout

This means that my original "shop" menu item is still highlighted and I now have an extra item in my dropdown allowing users to go directly to the checkout - win, win.

I will start a new thread in the general forum for the 'hide when empty' feature.

Simon

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

Time to create page: 0.101 seconds
Powered by Kunena Forum