Categories for custom fields of the order

  • Posts: 8
  • Thank you received: 0
7 years 9 months ago #169899

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.29

Hi,
When we create a custom field for contact, for example, we have the opportunity separate each new custom field in categories, that these field just will show on specific categories areas.
When we create custom field for order, for example, we don't have the opportunity to separate them on categories.
On some future version of HIkaShop you will add this feature: add categories to the custom fields of the order, for these fields just will show on specific categories of products on checkout ?

Thanks

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

  • Posts: 75859
  • Thank you received: 11840
  • MODERATOR
7 years 9 months ago #169932

Hi,

We won't do that because the custom order fields are displaying for the whole order not for particular products.
We can only do it when there is a relation 1-1 between the product and the place where the field is displaying like it's the case on a product page or the contact form of a product.

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

  • Posts: 8
  • Thank you received: 0
7 years 9 months ago #170045

Hi Nicolas,

Thanks for your return. Well, I am using HikaShop to build a ecommerce for a travel agency. And this travel agency have two distinct product. One is a travel package and the second is transfers.
The flux is very simple for both product. The client select the product and clicks on add to cart, that in our case we changed this button for "REQUEST YOUR RESERVATION". The client fills the custom order fields and accepts the terms and conditions. When the client clicks on "Finish" the administrator gets a email message with all the information about the product, and does the confirmation of the travel package or transfers with the tour operator. After the confirmation of the product, the administrator gets in contact with the client to the procedure of the payment, and manually sets the status of the product to "confirmed" or "cancelled".
For this flux I adjusted the "Checkout workflow" just to: Cart, Fields and HikaMarket Terms and Conditions. And works well for that situation. The only problem is that the transfers has specific informations and travel package has others.
I think that I have to develop a plugin for allow create categories to the custom order fields. What do you think about?

Thanks

Ps: sorry for my poor english.

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

  • Posts: 75859
  • Thank you received: 11840
  • MODERATOR
7 years 9 months ago #170062

Hi,

Why not use instead custom item fields, which display directly on the product page and which already support that capability ?
That would be the simplest solution as far as I can see.

Otherwise, it would require coding. And in that case, I see two potential ways of doing it:
1. if you don't have any required fields, modify the code in the file "custom_fields" of the view "checkout" in order to skip the display of the fields you don't want based on the products in the cart.
2. if you have required fields, that you require creating a HikaShop plugin implementing more advanced functions (more complex).

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

  • Posts: 8
  • Thank you received: 0
7 years 9 months ago #170188

Hi, Nicolas
Thanks again for your support. I need a way of pick up different kind of information from the client that buys a travel package or a transfer. For the transfer I need pick up information about "Final destination address", and for travel packages, I have different information like "SPECIAL REQUESTS". And both are a text area for client type the informations.
I did a brief analysis on the code base of the HikaShop and I found a good solution.
I did some modification on the "hikashopFieldClass" to get the desired output, and I saved it into my plugin with another namespace. On the event "onInitCheckoutStep" , I have the opportunity to get a reference of the "CheckoutViewCheckout", so I changed the state of the attribute CheckoutViewCheckout::extraFields for the extra fields that I need, of on accord with the category of product. That way the solution stays independent of the update of the core (HikaShop) and of the template too.
And for while works well!

Gratefully for your support

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

  • Posts: 75859
  • Thank you received: 11840
  • MODERATOR
7 years 9 months ago #170194

Hi,

Yes, that's a really good solution since you know what you're doing :)

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

  • Posts: 8
  • Thank you received: 0
7 years 9 months ago #170255

No problem! That's my job! :cheer:

Thanks

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

Time to create page: 0.066 seconds
Powered by Kunena Forum