Custom product/order field: can this be set by the system?

  • Posts: 28
  • Thank you received: 0
8 years 7 months ago #254764

I have a client trying to do online bookings for events with a lot of different dates, so it isn't a desirable solution to create a hika characteristic for each date because some dates become unavailable over time or don't apply to certain products.

I was wondering if there is a way to create a custom field, which is set by the system based on a custom script and the user cannot change this field but can see it. The field would be displayed in the checkout as well as in the backend during order processing.

In your documentation there appears to be something like this in the business edition ("order custom field"?). Can this be configured to be unchangeable by the customer but changeable when placing an order?

Example:
30 events are added as products and each has its own set of date/times. Instead of setting up a characteristic for each event/date, an external database would contain all the events and dates, and a custom script would list these dates on the event/product page. The client would pick a date and the script/system would append this selection to the order as a custom field, which is displayed during checkout and backend.

ie. "Some Concert" occurs on "November 9, 10, 11". Customer picks November 10 and hits add-to-cart, when this is done, the script appends "November 10" to the custom field for the concert. During checkout, the customer sees something like "Some concert: November 10" and in the backend, the staff sees "some concert" with the custom field = "November 10"

Last edit: 8 years 7 months ago by Cedwyn.

Please Log in or Create an account to join the conversation.

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
8 years 7 months ago #254776

Hi,

That is a really big question and there is a lot to talk about.

First, there is a the custom field documentation page which will describe the different types.
www.hikashop.com/support/documentation/1...shop-field-form.html

After that, there is a documentation more oriented as a tutorial :
www.hikashop.com/support/documentation/1...p-field-listing.html

So yes, with HikaShop business you will have access to "item" and "order" custom field which allow the customer to provide details about the "order product" or the "order".
If you do not have HikaShop business, that feature won't be available.

Thanks to custom plugin ; you can create new kind of custom field. You can find example like the "advanced date picker".
It allows you to have more complexe interface for the custom field and to handle both display (edition part and simple display part).
When you're using a custom plugin to create new kind of field ; the call give you basic details and you can access to the "order product" (or cart product) object or to the "order" (or cart) object.
Thanks to these objects, you can check the order details, the customer and do some SQL query to get the data you need.

Regarding a "booking" system ; it will be better to use an "item" custom field so you can attach the data information to the product itself. So if the customer want to reserve for two different "dates", it will be possible.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum