[Skip to main content](#vessel-content)

#   display Cart block in checkout page - php code

##

- **[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")**
- [![aminweb's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38602.png)](/forum/user/38602-aminweb "View aminweb's Profile") Topic Author
- [ Offline](/forum/user/38602-aminweb)
- Amin

Less More

- Posts: 138
- Thank you received: 4
-
-
-

4 years 3 months ago -  4 years 3 months ago [\#344268](#344268) by [aminweb](/forum/user/38602-aminweb "View aminweb's Profile")  *[display Cart block in checkout page - php code](/forum/27-checkout/904932-display-cart-block-in-checkout-page-php-code#344268 "-- HikaShop version -- : 4.6.1 -- Joomla version -- : 4.1.5 -- PHP version -- : 7.4 -- Browser(s) name and version -- : chrome  hi, I want to redesign the checkout page. I want to put the Cart block on this page. But without considering the checkout step workflow. (in my checkout step workflow : Step1:Login,Address || Step2:Shipping || Step3:Payment ) so i override show.php in template. &#92;html&#92;com&#95;hikashop&#92;checkout&#92;show.php  PS: I don't want to use the module for that.  and i put this code:  it is work and displayed cart block. but have two problem: 1-when click on update quantity , make error.  2-not display image of product")* was created by *[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")*

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.1.5
-- PHP version -- : 7.4
-- Browser(s) name and version -- : chrome

hi,
I want to redesign the checkout page.
I want to put the Cart block on this page. But without considering the checkout step workflow. (in my checkout step workflow : Step1:Login,Address &#124;&#124; Step2:Shipping &#124;&#124; Step3:Payment )
so i override show.php in template. \html\com_hikashop\checkout\show.php

PS: I don't want to use the module for that.

and i put this code: Code:

&lt;?php $this-&gt;setLayout('show_block_cart'); echo $this-&gt;loadTemplate(); ?&gt;

it is work and displayed cart block. but have two problem:
1-when click on update quantity , make error.
[ ![2022-08-31&#95;112341.png](/forum/attachment/55432) ](/forum/attachment/55432 "...-31&#95;112341.png")

2-not display image of product
[ ![2022-08-31&#95;112118.png](/forum/attachment/55431) ](/forum/attachment/55431 "...-31&#95;112118.png")

---

Joomla Developer \| am.ebrahimzadeh\[at\]gmail.com

- [ ![2022-08-31&#95;112118.png](/forum/attachment/55431) ](/forum/attachment/55431 "...-31&#95;112118.png") [ ](/forum/attachment/55431?download=1 "...-31&#95;112118.png")
- [ ![2022-08-31&#95;112341.png](/forum/attachment/55432) ](/forum/attachment/55432 "...-31&#95;112341.png") [ ](/forum/attachment/55432?download=1 "...-31&#95;112341.png")

Last edit: 4 years 3 months ago by [aminweb](/forum/user/38602-aminweb "View aminweb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDkzMi1kaXNwbGF5LWNhcnQtYmxvY2staW4tY2hlY2tvdXQtcGFnZS1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 3 months ago [\#344290](#344290) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[display Cart block in checkout page - php code](/forum/27-checkout/904932-display-cart-block-in-checkout-page-php-code#344290 "-- HikaShop version -- : 4.6.1 -- Joomla version -- : 4.1.5 -- PHP version -- : 7.4 -- Browser(s) name and version -- : chrome  hi, I want to redesign the checkout page. I want to put the Cart block on this page. But without considering the checkout step workflow. (in my checkout step workflow : Step1:Login,Address || Step2:Shipping || Step3:Payment ) so i override show.php in template. &#92;html&#92;com&#95;hikashop&#92;checkout&#92;show.php  PS: I don't want to use the module for that.  and i put this code:  it is work and displayed cart block. but have two problem: 1-when click on update quantity , make error.  2-not display image of product")*

Hi,

All the inputs, buttons and ids in each block of the checkout rely on the step id where the block is and the position id in that step.
If you load the view like that, it doesn't have a step nor a position to rely on and thus everything will be refused.
It is possible to do what you want, however, you need to :
- provide the step of another cart block from your checkout workflow in $this-&gt;workflow_step
- provide the position of that other cart block in that step in $this-&gt;module_position
- provide the options of the Code:

$this-&gt;workflow['steps'][$this-&gt;workflow_step]['content'][$this-&gt;module_position]

in $this-&gt;options
- enclose the block in a form tag with the same action as the main one in checkout / show and with the same hidden input fields for task, cart_id and the form token.

Now, if you want to add the cart block in checkout / show I don't understand why you don't want to just use the checkout workflow for this ? I don't see any reason. It will be easier on you and you won't need any overrides. Even if you need extra HTML around the different blocks, you can use the "text" block for it. And you can add the cart view in several steps too.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDkzMi1kaXNwbGF5LWNhcnQtYmxvY2staW4tY2hlY2tvdXQtcGFnZS1waHAtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
