Add View To Checkout that displays on Every Page

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 8 months ago #295383

-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.10

I created this little order summary view in the "checkout / show_block_cart.php" view that you can see in the screenshot below:



However, I am trying to figure out a way to display the order summary only (not the full cart) on every page of the checkout. I would assume I could accomplish this by adding it to the "checkout / show.php" file. I tried this and it displays the block, but not the cart information. How would i display the order information on any arbitrary view file?

Or rather, is there a better way of accomplishing this by maybe adding a new view to the checkout process? Any help or advice would be greatly appreciated!

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
5 years 8 months ago #295399

Hello,

A solution can eventually be to directly unset the "Cart" action through steps of your checkout workflow via "Hikashop->System->Configuration->Checkout".

Best regards,
Mohamed Thelji.

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 8 months ago #295431

I'm not sure I follow. It sounds like you are suggesting to remove the "Cart" step from the checkout workflow. However, once I do this, I'm not entirely sure how to display this module on every page of the checkout?

Basically, i want to create another checkout view that is visible on every checkout page. The best option I found is to include it on the "checkout/show.php" view file. However, I do not know how to pull the order info up in that view?

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

  • Posts: 1119
  • Thank you received: 114
5 years 8 months ago #295433

Hi,

I think the only way for you is to have cart view for each step which will be set to read only via checkout configurations. Then you would have to modify show_block_cart.php view and use such code inside:

As example this will add col-md-3 (if you are using bootstrap 3) class if cart is set to read only:

<?php if(!empty($this->options['status'])) echo 'col-md-3';?>

You also can wrap and hide content like this:
<?php if(empty($this->options['status'])) { ?>

..Your code here which you would like to hide...

<?php } ?>

I won't go into deeper explanations but this is easy job if you have some php/html skills.

Hope that helps.

Thanks

The following user(s) said Thank You: nicolas, mojooutdoors-holden

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 8 months ago #295434

Exactly what I was initially thinking to do. However, I am not sure how to hide certain elements based on the current step. For example, if I wanted to hide a div on step 2 of the checkout, what is the php entry that corresponds to the current checkout step?

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

  • Posts: 303
  • Thank you received: 18
  • Hikashop Business
5 years 8 months ago #295435

After playing around with it, I was able to get it working (at least the hide/unhide) with the read-only trick. I should be able to alter the display now to make it show on every page. Thank you!

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

Time to create page: 0.096 seconds
Powered by Kunena Forum