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

#   Custom field to store EAN Code

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 11 months ago -  10 years 11 months ago [\#222621](#222621) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222621 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.6
-- Joomla version -- : 3.45

I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.

Would be ideal that only numbers could be stored and avoid a "by accident" introduction of letters.

Can I achieve this with custom field?

If so, could you help me with the regular expression?

Thank you.

---

UPDATE

Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern

customtext_334_12_30_26

I tried several names without success

ean_code
ean_number
ean_code_number

---

Then when I make an import form a CSV I get this message for this field:

The column 'customtext_334_12_29_26' is not in the list of possible columns : (although it is clearly present in the custom field list)

Last edit: 10 years 11 months ago by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222652](#222652) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222652 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")*

Hi,

1/ Code:

^[0-9]+$

More about regular expressions : [ developer.mozilla.org/en-US/docs/Web/Jav...lobal\_Objects/RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp)

2/ Custom text does not create any column.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 11 months ago -  10 years 11 months ago [\#222765](#222765) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222765 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")*

Thank you.

Maybe my explanation about point #2 was not very good. I will do different.

You say that custom text does not create any column, well, indeed it does as it is a custom field. Let me show white I write and what I get after saving the custom field.

Read the data in the third form field named Column name.

When creating the custom field with **Field type** customtext
[ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;50&#95;37.png](/forum/attachment/28129) ](/forum/attachment/28129 "...es&#95;8&#95;50&#95;37.png")

After saving it
[ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;50&#95;48.png](/forum/attachment/28130) ](/forum/attachment/28130 "...es&#95;8&#95;50&#95;48.png")

Then when importing data form hikashop the system is not identifying none of the names, not mine not the one after saving.

Regards,

UPDATE:

And this what I see in custom field list view

[ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;55&#95;42.png](/forum/attachment/28131) ](/forum/attachment/28131 "...es&#95;8&#95;55&#95;42.png")

- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;50&#95;37.png](/forum/attachment/28129) ](/forum/attachment/28129 "...es&#95;8&#95;50&#95;37.png") [ ](/forum/attachment/28129?download=1 "...es&#95;8&#95;50&#95;37.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;50&#95;48.png](/forum/attachment/28130) ](/forum/attachment/28130 "...es&#95;8&#95;50&#95;48.png") [ ](/forum/attachment/28130?download=1 "...es&#95;8&#95;50&#95;48.png")
- [ ![Captura&#95;de&#95;pantalla&#95;2015-12-02&#95;a&#95;les&#95;8&#95;55&#95;42.png](/forum/attachment/28131) ](/forum/attachment/28131 "...es&#95;8&#95;55&#95;42.png") [ ](/forum/attachment/28131?download=1 "...es&#95;8&#95;55&#95;42.png")

Last edit: 10 years 11 months ago by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile"). Reason: added custom field list view

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222774](#222774) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222774 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")*

Hi,

I guess that you did not understand me but my answer was good.

> Custom text does not create any column.

The "custom text" is not a custom field ; it is a field to display a fixed custom text.
It does not create any single column in the database to allow you to store anything.

So, that is not the type of custom field you want to use.

I hope that type, my explanation is clear enough.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 11 months ago [\#222902](#222902) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222902 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")*

Wow! :ohmy:

It took me a while to figure your explanation. Finally I understand that is serves the purpose of showing an informative text when some view displays the custom fields autmoatically one after the other, so the purpose of custom text is its label to be displayed before or after a set of custom fields.

Is this the concept? I was not good to find in the documentation but I found several posts getting the same confusion as me.

What is harder for me to understand is what are the regex for. I was convinced that was a way to build an input mask so that is why I was so interested in this field type.

Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

10 years 11 months ago [\#222928](#222928) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom field to store EAN Code](/forum/32-content-creation/880827-custom-field-to-store-ean-code#222928 "-- HikaShop version -- : 2.6 -- Joomla version -- : 3.45  I need to store an EAN code and I don't see a default field for this so I will go to creat a custom field.  Would be ideal that only numbers could be stored and avoid a &quot;by accident&quot; introduction of letters.  Can I achieve this with custom field?  If so, could you help me with the regular expression?  Thank you.  ----- UPDATE  Another question related to the same topic. When I create a customtext custom field there is no way the column name assumes the name I give and it gives a random name with this pattern  customtext&#95;334&#95;12&#95;30&#95;26  I tried several names without success  ean&#95;code ean&#95;number ean&#95;code&#95;number  -----  Then when I make an import form a CSV I get this message for this field:  The column 'customtext&#95;334&#95;12&#95;29&#95;26' is not in the list of possible columns : (although it is clearly present in the custom field list)")*

Hi,

Yes, it's to just display informative text before/after the fields.

Regarding the regex, you're right. It's to build an input mask so that you can force the customer to only enter text in a specific format. The regex option field should actually on appear for the custom text type custom fields since you can't enter anything in them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vODgwODI3LWN1c3RvbS1maWVsZC10by1zdG9yZS1lYW4tY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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.060 seconds

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