- Posts: 18
- Thank you received: 0
Add order or cart from another component
15 years 5 months ago #13749
by Jiwoks
Add order or cart from another component was created by Jiwoks
Hello,
I have to create orders or carts from backend for other users.
I think there is no way to do this from HikaShop backend, so I think I will make my own component to create orders or carts.
Is there a way to do this properly by helper inclusion or some other stuff?
Or maybe I have to insert it directly into the database.
Thanks.
Jiwoks
I have to create orders or carts from backend for other users.
I think there is no way to do this from HikaShop backend, so I think I will make my own component to create orders or carts.
Is there a way to do this properly by helper inclusion or some other stuff?
Or maybe I have to insert it directly into the database.
Thanks.
Jiwoks
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13754
by nicolas
Replied by nicolas on topic Re: Add order or cart from another component
Hi,
It depends on how you want to do it. How do you know which products to add to the orders ? And the user of the order ? What is your goal ?
It depends on how you want to do it. How do you know which products to add to the orders ? And the user of the order ? What is your goal ?
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13789
by Jiwoks
Replied by Jiwoks on topic Re: Add order or cart from another component
Hi Nicolas,
Thanks for your reply.
Hikashop will be used for phone prospection.¨
Prospector will create the new user from the backend, create the cart or the order (should be the better solution) and send a link by mail to the customer.
The customer will be able to complete the order with the paiement.
The products are already in the database.
All this backend operations will be developed on a new component.
Thanks for your reply.
Hikashop will be used for phone prospection.¨
Prospector will create the new user from the backend, create the cart or the order (should be the better solution) and send a link by mail to the customer.
The customer will be able to complete the order with the paiement.
The products are already in the database.
All this backend operations will be developed on a new component.
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13791
by nicolas
Replied by nicolas on topic Re: Add order or cart from another component
Ok.
In the order class of hikashop there are no easy functions to add a product to an order or the like as the complete information of orders is taken from the cart on the front end at the end of the checkout.
You have 2 possibilities here. Either you override the views of the order edition page in order to do what you want, or create a totally new component for that.
In the order class of hikashop there are no easy functions to add a product to an order or the like as the complete information of orders is taken from the cart on the front end at the end of the checkout.
You have 2 possibilities here. Either you override the views of the order edition page in order to do what you want, or create a totally new component for that.
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13795
by Jiwoks
Replied by Jiwoks on topic Re: Add order or cart from another component
I think I will create my own component to insert cart into HikaShop tables.
But I have another question: in the table hikashop_cart what are the fields session_id and cart_modified, and cart_product_modified in hikashop_cart_product?
Are the cart deleted automaticaly if the user isn't connected during a long time?
Thanks in advance.
But I have another question: in the table hikashop_cart what are the fields session_id and cart_modified, and cart_product_modified in hikashop_cart_product?
Are the cart deleted automaticaly if the user isn't connected during a long time?
Thanks in advance.
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13801
by nicolas
Replied by nicolas on topic Re: Add order or cart from another component
The session_id is the id of the session of the user. When users are not logged in on the website, the cart of the user is attached to his session id. When the user logs in, the session id field is emptied and the cart_user_id field is set with the id of the user. In your case, you could set the cart_user_id directly and ignore the session id field.
The cart_modified and cart_product_modified fields contain the timestamp of the modification date. In the config, you can define a cart retaining period after which the carts are deleted automatically.
The cart_modified and cart_product_modified fields contain the timestamp of the modification date. In the config, you can define a cart retaining period after which the carts are deleted automatically.
Please Log in or Create an account to join the conversation.
15 years 5 months ago #13816
by Jiwoks
Replied by Jiwoks on topic Re: Add order or cart from another component
Thank you very much for your really good quality and so quick support.
It's my first use of HikaShop but I think not the last.
It's my first use of HikaShop but I think not the last.
Please Log in or Create an account to join the conversation.
Time to create page: 0.387 seconds