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

#   when onAfterOrderDelete($elements) was triggered

##

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 1 month ago [\#251721](#251721) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  *[when onAfterOrderDelete($elements) was triggered](/forum/31-development/886786-when-onafterorderdelete-elements-was-triggered#251721 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, I need the content of the order when onAfterOrderDelete is triggered, but the order and order&#95;products is already removed from DB. Is there a way that I can get the order information before the it is removed? Thanks  Best regards Scott")* was created by *[twscott](/forum/user/43011-twscott "View twscott's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.5
-- PHP version -- : 5.5.12

Hi,
I need the content of the order when onAfterOrderDelete is triggered, but the order and order_products is already removed from DB. Is there a way that I can get the order information before the it is removed?
Thanks

Best regards
Scott

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4Njc4Ni13aGVuLW9uYWZ0ZXJvcmRlcmRlbGV0ZS1lbGVtZW50cy13YXMtdHJpZ2dlcmVkP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 1 month ago [\#251765](#251765) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[when onAfterOrderDelete($elements) was triggered](/forum/31-development/886786-when-onafterorderdelete-elements-was-triggered#251765 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, I need the content of the order when onAfterOrderDelete is triggered, but the order and order&#95;products is already removed from DB. Is there a way that I can get the order information before the it is removed? Thanks  Best regards Scott")*

Hi,

Instead of onAfterOrderDelete you should implement onBeforeOrderDelete
There you can use the loadFullOrder function of HikaShop to load all the data of the order that will be deleted.
[ www.hikashop.com/support/documentation/6...umentation.html#code](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#code)

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

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