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

#   Create order in Backend

##

- **[Joomill](/forum/user/33738-joomill "View Joomill's Profile")**
- [![Joomill's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33738.jpg)](/forum/user/33738-joomill "View Joomill's Profile") Topic Author
- [ Offline](/forum/user/33738-joomill)

Less More

- Posts: 224
- Thank you received: 10
-
-
- [](http://www.joomill.nl)
-

1 year 9 months ago [\#365657](#365657) by [Joomill](/forum/user/33738-joomill "View Joomill's Profile")  *[Create order in Backend](/forum/35-orders-management/909134-create-order-in-backend#365657 "-- HikaShop version -- : 5.1.3 -- Joomla version -- : 4.4.10  Hi,  My client has customers who create orders but don't finish the order before they got there weekly delivery. He finishes the order himself in the backend (cart &gt; create order). This works fine but there are 2 small issues.  - We have an Advanced date picker field. Because the customers never added a date, the desired deliverydate is always 30-11-1999 Can we change the default date to &quot;today + 1 day&quot; ?  - We use the option &quot;Clean cart when order is Created&quot; It seems this only work in the frontend. Can we make this work when order is created in the backend?  Thanks in advance. Jeroen")* was created by *[Joomill](/forum/user/33738-joomill "View Joomill's Profile")*

-- HikaShop version -- : 5.1.3
-- Joomla version -- : 4.4.10

Hi,

My client has customers who create orders but don't finish the order before they got there weekly delivery.
He finishes the order himself in the backend (cart &gt; create order).
This works fine but there are 2 small issues.

- We have an Advanced date picker field.
Because the customers never added a date, the desired deliverydate is always 30-11-1999
Can we change the default date to "today + 1 day" ?

- We use the option "Clean cart when order is Created"
It seems this only work in the frontend. Can we make this work when order is created in the backend?

Thanks in advance.
Jeroen

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

1 year 9 months ago [\#365665](#365665) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Create order in Backend](/forum/35-orders-management/909134-create-order-in-backend#365665 "-- HikaShop version -- : 5.1.3 -- Joomla version -- : 4.4.10  Hi,  My client has customers who create orders but don't finish the order before they got there weekly delivery. He finishes the order himself in the backend (cart &gt; create order). This works fine but there are 2 small issues.  - We have an Advanced date picker field. Because the customers never added a date, the desired deliverydate is always 30-11-1999 Can we change the default date to &quot;today + 1 day&quot; ?  - We use the option &quot;Clean cart when order is Created&quot; It seems this only work in the frontend. Can we make this work when order is created in the backend?  Thanks in advance. Jeroen")*

Hi,

- You can create a mass action with the trigger "after an order is created", with a filter where the custom field is empty, and with an action "update the values" on the custom field column with the operation mode, using the MySQL concat ( [ www.w3schools.com/sql/func\_mysql\_concat.asp](https://www.w3schools.com/sql/func_mysql_concat.asp) ) and date functions ( [ dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html](https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html) ) to set this up so that when you click on the created button, the date in the field gets automatically set to the correct value you want.

- This is indeed only linked to the frontend. In the backend, the cart is not deleted if you create the order from a cart.
You should be able to do it with another massaction with the trigger "after an order is created" and an action "run PHP code" like so: Code:

$app = JFactory::getApplication(); $cart_id = hikashop_getCID('cart_id'); if($app-&gt;isClient('administrator') &amp;&amp; !empty($cart_id)) { $cartClass = hikashop_get('class.cart'); $cartClass-&gt;delete($cart_id); // $app-&gt;redirect(); you might want to redirect to the order edit page directly here }

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

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