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

#   \[solved\]order custom field to simulate shipment

##

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 8 months ago -  13 years 8 months ago [\#91176](#91176) by [SG](/forum/user/12204-sg "View SG's Profile")  *[\[solved\]order custom field to simulate shipment](/forum/2-general-talk-about-hikashop/78569-solved-order-custom-field-to-simulate-shipment#91176 "Hi,  For the shipment the client wants to show three states:  &#42; Normal  &#42; Urgent  &#42; Self Pickup (give comment on which date and hour in a textarea field  When the last one is chosen &quot;Self Pickup&quot; a text area field should be displayed where the customer can tell when he'd like to pickup his order.  Since we are not going to use prices for the shipment, I thought I would use a custom field.  I made two custom fields: First one of the type RADIO called &quot;ShipmentMethods&quot; and has the tree values: Normal, Urgent and Self Pickup. A second field &quot;CommentShipment&quot;of the type TEXTARE and used &quot;Display limited to&quot; &quot;ShipmentMethods&quot; and last value &quot;Self Pickup&quot;.  The reasons we do it this way are because:  &#42; we are not mandatory to use weight in products since we don't use it anyway. Otherwise the shipment plugin isn't shown  &#42; we can add a comment field for additional info about the self pickup date and time  Everything seems to be working but I have two questions :-)  Thanks")* was created by *[SG](/forum/user/12204-sg "View SG's Profile")*

Hi,

For the shipment the client wants to show three states:

- Normal
- Urgent
- Self Pickup (give comment on which date and hour in a textarea field

When the last one is chosen "Self Pickup" a text area field should be displayed where the customer can tell when he'd like to pickup his order.

Since we are not going to use prices for the shipment, I thought I would use a custom field.

I made two custom fields:
First one of the type RADIO called "ShipmentMethods" and has the tree values: Normal, Urgent and Self Pickup.
A second field "CommentShipment"of the type TEXTARE and used "Display limited to" "ShipmentMethods" and last value "Self Pickup".

The reasons we do it this way are because:

1. we are not mandatory to use weight in products since we don't use it anyway. Otherwise the shipment plugin isn't shown
2. we can add a comment field for additional info about the self pickup date and time

Everything seems to be working but I have two questions ![:-)](/media/kunena/emoticons/3.png ":-)")

1) Is this a good approach? Do you think I have to watch out for something or any other advice?

**EDIT: I answered question 2 myself ![:-)](/media/kunena/emoticons/3.png ":-)") but any remarks are welcome!**
2) Is it possible to display the chosen values in from both custom fields in the STATUS?
Because I like the way it's says

> You chose the shipping method: Self Pickup

I know I could just drag FIELDS in the checkout workflow but I'd rather show a read only text just like the hika shipment plugin.

Thanks

Last edit: 13 years 8 months ago by [SG](/forum/user/12204-sg "View SG's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4NTY5LXNvbHZlZC1vcmRlci1jdXN0b20tZmllbGQtdG8tc2ltdWxhdGUtc2hpcG1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 8 months ago -  13 years 8 months ago [\#91230](#91230) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[order custom field to simulate shipment](/forum/2-general-talk-about-hikashop/78569-solved-order-custom-field-to-simulate-shipment#91230 "Hi,  For the shipment the client wants to show three states:  &#42; Normal  &#42; Urgent  &#42; Self Pickup (give comment on which date and hour in a textarea field  When the last one is chosen &quot;Self Pickup&quot; a text area field should be displayed where the customer can tell when he'd like to pickup his order.  Since we are not going to use prices for the shipment, I thought I would use a custom field.  I made two custom fields: First one of the type RADIO called &quot;ShipmentMethods&quot; and has the tree values: Normal, Urgent and Self Pickup. A second field &quot;CommentShipment&quot;of the type TEXTARE and used &quot;Display limited to&quot; &quot;ShipmentMethods&quot; and last value &quot;Self Pickup&quot;.  The reasons we do it this way are because:  &#42; we are not mandatory to use weight in products since we don't use it anyway. Otherwise the shipment plugin isn't shown  &#42; we can add a comment field for additional info about the self pickup date and time  Everything seems to be working but I have two questions :-)  Thanks")*

Hi,

The more I use HikaShop, the more I like it ![:-)](/media/kunena/emoticons/3.png ":-)")

For **question 2** I found how to do it.
I had to go to Display -&gt; Views and the open checkout / status.php
There I added the following code: Code:

if(!empty($this-&gt;order-&gt;ShipmentMethods)){ if(!empty($this-&gt;order-&gt;CommentShipment)){ $array[]= JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN', '&lt;span class="label label-info"&gt; '.$this-&gt;order-&gt;ShipmentMethods.': '.$this-&gt;order-&gt;CommentShipment.'&lt;/span&gt;'); } else{ $array[]= JText::sprintf('HIKASHOP_SHIPPING_METHOD_CHOSEN', '&lt;span class="label label-info"&gt; '.$this-&gt;order-&gt;ShipmentMethods.'&lt;/span&gt;'); } }

This might be interesting for anyone who wants to add their own custom field in a read-only mode in the status.

So I guess I'm just wondering about question 1 if it has any **disadvantage** that you can think of by using a custom shipment field like I did.

Thanks.

Last edit: 13 years 8 months ago by [SG](/forum/user/12204-sg "View SG's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4NTY5LXNvbHZlZC1vcmRlci1jdXN0b20tZmllbGQtdG8tc2ltdWxhdGUtc2hpcG1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

13 years 8 months ago [\#91403](#91403) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[order custom field to simulate shipment](/forum/2-general-talk-about-hikashop/78569-solved-order-custom-field-to-simulate-shipment#91403 "Hi,  For the shipment the client wants to show three states:  &#42; Normal  &#42; Urgent  &#42; Self Pickup (give comment on which date and hour in a textarea field  When the last one is chosen &quot;Self Pickup&quot; a text area field should be displayed where the customer can tell when he'd like to pickup his order.  Since we are not going to use prices for the shipment, I thought I would use a custom field.  I made two custom fields: First one of the type RADIO called &quot;ShipmentMethods&quot; and has the tree values: Normal, Urgent and Self Pickup. A second field &quot;CommentShipment&quot;of the type TEXTARE and used &quot;Display limited to&quot; &quot;ShipmentMethods&quot; and last value &quot;Self Pickup&quot;.  The reasons we do it this way are because:  &#42; we are not mandatory to use weight in products since we don't use it anyway. Otherwise the shipment plugin isn't shown  &#42; we can add a comment field for additional info about the self pickup date and time  Everything seems to be working but I have two questions :-)  Thanks")*

Hi,

That's indeed a good approach for your use case. And the code you used is the way to go.
I would have done the same.

The following user(s) said Thank You: [SG](/forum/user/12204-sg "View SG's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4NTY5LXNvbHZlZC1vcmRlci1jdXN0b20tZmllbGQtdG8tc2ltdWxhdGUtc2hpcG1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.094 seconds

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

[](#top)
