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

#   customize checkout (developer question)

##

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

2 years 4 months ago -  2 years 4 months ago [\#361920](#361920) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  *[customize checkout (developer question)](/forum/27-checkout/908357-customize-checkout-developer-question#361920 "hi i want move the subtotal, shipping, Total from checkout / show&#95;block&#95;coupon.php to checkout / show&#95;block&#95;cart.php according attached picture.what is the standard way?  i do some modify in php files and it work but i have another problem.")* was created by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")*

hi
i want move the subtotal, shipping, Total from
checkout / show_block_coupon.php
to
checkout / show_block_cart.php
according attached picture.what is the standard way?
[ ![Untitled55555555.png](/forum/attachment/59467) ](/forum/attachment/59467 "...ed55555555.png")

i do some modify in php files and it work but i have another problem.

- [ ![Untitled55555555.png](/forum/attachment/59467) ](/forum/attachment/59467 "...ed55555555.png") [ ](/forum/attachment/59467?download=1 "...ed55555555.png")

Last edit: 2 years 4 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODM1Ny1jdXN0b21pemUtY2hlY2tvdXQtZGV2ZWxvcGVyLXF1ZXN0aW9uP3RtcGw9bWFya2Rvd24=) 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: 86582
- Thank you received: 14322
-
-

2 years 4 months ago [\#361929](#361929) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[customize checkout (developer question)](/forum/27-checkout/908357-customize-checkout-developer-question#361929 "hi i want move the subtotal, shipping, Total from checkout / show&#95;block&#95;coupon.php to checkout / show&#95;block&#95;cart.php according attached picture.what is the standard way?  i do some modify in php files and it work but i have another problem.")*

Hi,

I'm sorry but I have a hard time to access your checkout.
When I try your link, I arrive on this page:
[ i.imgur.com/ja9jrnY.png](https://i.imgur.com/ja9jrnY.png)
Then, I don't know what to do. the blue button doesn't lead to a products listing with add to cart buttons. So I'm not sure what I need to do.
Could you provide instructions ?

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

- **[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")**
- [![sadaf3d's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46256-sadaf3d "View sadaf3d's Profile") Topic Author
- [ Offline](/forum/user/46256-sadaf3d)

Less More

- Posts: 221
- Thank you received: 8
-

2 years 4 months ago [\#361938](#361938) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[customize checkout (developer question)](/forum/27-checkout/908357-customize-checkout-developer-question#361938 "hi i want move the subtotal, shipping, Total from checkout / show&#95;block&#95;coupon.php to checkout / show&#95;block&#95;cart.php according attached picture.what is the standard way?  i do some modify in php files and it work but i have another problem.")*

excuse me for empty cart when you arrive .
step1:
click on the green button
[ daneh.ir/component/moojla/coursedetail/3566](https://daneh.ir/component/moojla/coursedetail/3566)
step2:
add "arman100" as coupon to set
step3:
(problem1) coupon affected on total in the page but not affected in the cart module total price.
(problem2) remove product not possible with Trash icon from page. it only work from cart module.
note: i understand this is not a hikashop issues and it is maybe from my customization, but if you can advise me about is my work is right or not. thenk you.
i attached 3 files that i modify that which you can replace in your demo and see result.
*This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODM1Ny1jdXN0b21pemUtY2hlY2tvdXQtZGV2ZWxvcGVyLXF1ZXN0aW9uP3RtcGw9bWFya2Rvd24=) 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: 86582
- Thank you received: 14322
-
-

2 years 4 months ago [\#361945](#361945) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[customize checkout (developer question)](/forum/27-checkout/908357-customize-checkout-developer-question#361945 "hi i want move the subtotal, shipping, Total from checkout / show&#95;block&#95;coupon.php to checkout / show&#95;block&#95;cart.php according attached picture.what is the standard way?  i do some modify in php files and it work but i have another problem.")*

Hi,

When I try to add the coupon to my cart, I get this error:
[ i.imgur.com/VkodEtO.png](https://i.imgur.com/VkodEtO.png)
So I was still not able to look at problem 1.

Regarding problem 2, I can see that the problem is that you're using the code from the cart module for the delete button in the context of the checkout.
I can this code: Code:

&lt;a href="/سبد-خـرید-دوره-ها/product/updatecart/cart_product_id-96242/quantity-0?cart_id=92609&amp;amp;return_url=L9iz2KjYry3YrtmA2LHbjNivLdiv2YjYsdmHLdmH2KcvY2hlY2tvdXQ%3D" data-cart-id="92609" data-cart-type="cart" data-cart-product-id="96242" onclick="if(window.hikashop) { return window.hikashop.deleteFromCart(this, null, 'hikashop_cart_650'); }" title="حذف"&gt; &lt;svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="256.000000pt" height="256.000000pt" viewBox="0 0 256.000000 256.000000" preserveAspectRatio="xMidYMid meet"&gt; .... svg data ..... &lt;/svg&gt; &lt;/a&gt;

As you can see, you have a call to window.hikashop.deleteFromCart. This call is actually the same you have in the cart module.
The problem is that "this" is a reference to the button clicked (in the checkout when you click on it in the cart view of the checkout), and hikashop_cart_650 is the id of the div encompassing the cart module. So there is some issue because the system doesn't find what it's looking for.
In the checkout cart view, the code is actually normally this: Code:

&lt;div class="hikashop_cart_product_quantity_delete"&gt; &lt;a class="hikashop_no_print" href="&lt;?php echo $delete_url; ?&gt;" onclick="var qty_field = document.getElementById('&lt;?php echo $this-&gt;last_quantity_field_id;?&gt;'); if(qty_field){qty_field.value=0; return window.checkout.submitCart(&lt;?php echo $this-&gt;step; ?&gt;,&lt;?php echo $this-&gt;module_position; ?&gt;); } return false;" title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;"&gt; &lt;i class="fa fa-times-circle"&gt;&lt;/i&gt; &lt;/a&gt; &lt;/div&gt;

You can see that the delete button in the checkout calls the window.checkout.submitCart function after setting the quantity input field in the checkout to 0. That's what you should do in your view override of the show_block_cart.

The following user(s) said Thank You: [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwODM1Ny1jdXN0b21pemUtY2hlY2tvdXQtZGV2ZWxvcGVyLXF1ZXN0aW9uP3RtcGw9bWFya2Rvd24=) 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.048 seconds

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