- Posts: 198
- Thank you received: 4
How to add items numbering in cart
8 years 7 months ago #289120
by arnask
How to add items numbering in cart was created by arnask
How can i add numbering of items in cart? 1,2,3,4... as much items
And i need to show these numbers in emails and order detail page.
Actually i need some number/code which identifies the order and item, for example i have 4 items in order. So if i get code A4C2B3-3, i will know the order number and which item.
i also thought about adding custom item field which will automatically generate some code after each item is added to cart, but haven't found such field type.
If it can't be done without coding, which versions will be the easiest for programmer?
And i need to show these numbers in emails and order detail page.
Actually i need some number/code which identifies the order and item, for example i have 4 items in order. So if i get code A4C2B3-3, i will know the order number and which item.
i also thought about adding custom item field which will automatically generate some code after each item is added to cart, but haven't found such field type.
If it can't be done without coding, which versions will be the easiest for programmer?
Please Log in or Create an account to join the conversation.
8 years 7 months ago #289121
by nicolas
Replied by nicolas on topic How to add items numbering in cart
Hi,
That will indeed require custom coding.
If you want to rely on a custom item field to store the code for each product in the cart/order, you'll need the Business edition.
That will indeed require custom coding.
If you want to rely on a custom item field to store the code for each product in the cart/order, you'll need the Business edition.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #289159
by arnask
Replied by arnask on topic How to add items numbering in cart
as you can see on left side of this forum - i have Business edition, long long time now.
So you recommend as easiest way to do that is to code some plugin which will add new custom field type?
So you recommend as easiest way to do that is to code some plugin which will add new custom field type?
Please Log in or Create an account to join the conversation.
8 years 7 months ago #289178
by nicolas
Replied by nicolas on topic How to add items numbering in cart
Hi,
No, I would create a normal custom item field of the type text in the interface.
But I would add a plugin implementing the onAfterOrderCreate trigger to update the value of the custom field in the hikashop_order_product table using the order_number of the order and the id you'll generate to store that for each product when the order is created.
Then, you can just activate the display settings of the custom item field to have the value display for each product in the different areas.
No, I would create a normal custom item field of the type text in the interface.
But I would add a plugin implementing the onAfterOrderCreate trigger to update the value of the custom field in the hikashop_order_product table using the order_number of the order and the id you'll generate to store that for each product when the order is created.
Then, you can just activate the display settings of the custom item field to have the value display for each product in the different areas.
Please Log in or Create an account to join the conversation.
Time to create page: 0.149 seconds