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

#   i whant to die in cart.php

##

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

Less More

- Posts: 3
- Thank you received: 0
-
-

15 years 1 week ago [\#29189](#29189) by [themhz](/forum/user/2433-themhz "View themhz's Profile")  *[i whant to die in cart.php](/forum/3-bug-report/29189-i-whant-to-die-in-cart-php#29189 "hi, I am trying to make the script die(); in cart.php (administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;cart.php) but when the code die(); is executed the script redirects at another internal page without dieing. &quot;I know they say that I shouldn't use die(); But i do and will :) so dont tell me not to.&quot; In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. :(")* was created by *[themhz](/forum/user/2433-themhz "View themhz's Profile")*

hi, I am trying to make the script die(); in cart.php (administrator\components\com_hikashop\classes\cart.php)
but when the code die(); is executed the script redirects at another internal page without dieing.
"I know they say that I shouldn't use die(); But i do and will ![:)](/media/kunena/emoticons/3.png ":)") so dont tell me not to."
In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. ![:(](/media/kunena/emoticons/22.png ":(")

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

15 years 1 week ago [\#29193](#29193) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: i whant to die in cart.php](/forum/3-bug-report/29189-i-whant-to-die-in-cart-php#29193 "hi, I am trying to make the script die(); in cart.php (administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;cart.php) but when the code die(); is executed the script redirects at another internal page without dieing. &quot;I know they say that I shouldn't use die(); But i do and will :) so dont tell me not to.&quot; In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. :(")*

Hi,

die(); should work there. At least it works on our end.
Are you sure that you're putting it correctly ? (ie not breaking the code).

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

15 years 1 week ago -  15 years 1 week ago [\#29198](#29198) by [themhz](/forum/user/2433-themhz "View themhz's Profile")  Replied by *[themhz](/forum/user/2433-themhz "View themhz's Profile")* on topic *[Re: i whant to die in cart.php](/forum/3-bug-report/29189-i-whant-to-die-in-cart-php#29198 "hi, I am trying to make the script die(); in cart.php (administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;cart.php) but when the code die(); is executed the script redirects at another internal page without dieing. &quot;I know they say that I shouldn't use die(); But i do and will :) so dont tell me not to.&quot; In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. :(")*

hmmm nope I am sure I am putting it correctly. I am using die(); at function updateEntry.
for example
function updateEntry($quantity,&amp;$cartContent,$product_id,$add,$resetCartWhenUpdate=true,$type='product',$force=false){
echo "ok";
die();
.
.
.

but it seems that when die occurs it redirects me to option=com_hikashop&amp;ctrl=product&amp;task=listing&amp;Itemid=87
hint could be that if i put some code that produces an error for example

function updateEntry($quantity,&amp;$cartContent,$product_id,$add,$resetCartWhenUpdate=true,$type='product',$force=false){

dfsasadsadas
.
.
.

the "dfsasadsadas" will be the error, it will not redirect me but crash. So there is no Try catch at the top of the hierarchy. Weird.. any hints? its like breaking and returning when the die happens.

Last edit: 15 years 1 week ago by [themhz](/forum/user/2433-themhz "View themhz's Profile").

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

15 years 1 week ago [\#29199](#29199) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: i whant to die in cart.php](/forum/3-bug-report/29189-i-whant-to-die-in-cart-php#29199 "hi, I am trying to make the script die(); in cart.php (administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;cart.php) but when the code die(); is executed the script redirects at another internal page without dieing. &quot;I know they say that I shouldn't use die(); But i do and will :) so dont tell me not to.&quot; In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. :(")*

Try to turn off the option "Use AJAX when possible for add to cart buttons" in the configuration. That will avoid that the page is redirected after the add to cart die.

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

15 years 1 week ago [\#29233](#29233) by [themhz](/forum/user/2433-themhz "View themhz's Profile")  Replied by *[themhz](/forum/user/2433-themhz "View themhz's Profile")* on topic *[Re: i whant to die in cart.php](/forum/3-bug-report/29189-i-whant-to-die-in-cart-php#29233 "hi, I am trying to make the script die(); in cart.php (administrator&#92;components&#92;com&#95;hikashop&#92;classes&#92;cart.php) but when the code die(); is executed the script redirects at another internal page without dieing. &quot;I know they say that I shouldn't use die(); But i do and will :) so dont tell me not to.&quot; In other places of the code die() is working fine, why not in the cart.php? its like something is resuming the code and skipping die if occurred. :(")*

thanx! now i can debug :silly:

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

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