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

#   注文番号をユニークにできますか

##

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

Less More

- Posts: 8
- Thank you received: 0
-
-

10 years 10 months ago [\#224477](#224477) by [yumikom](/forum/user/39711-yumikom "View yumikom's Profile")  *[注文番号をユニークにできますか](/forum/6-japanese-support/881153#224477 "-- HikaShop version -- : HikaShop Business 2.6.0 &#91;1511171458&#93; -- Joomla version -- : 3.4.5  いつもお世話になっております。  注文番号を{id}にしています。 連番になってしまいますので、ユニークな数字に変更したいのですが、 hikashopの機能でユニークな注文番号を桁数指定して生成することはできますでしょうか？  デフォルトの{automatic&#95;code}ですと２桁の英数字ですが、５桁のユニークな数字で生成できる方法を探しています。  ご教示お願いします。")* was created by *[yumikom](/forum/user/39711-yumikom "View yumikom's Profile")*

-- HikaShop version -- : HikaShop Business 2.6.0 [1511171458]
-- Joomla version -- : 3.4.5

いつもお世話になっております。

注文番号を{id}にしています。
連番になってしまいますので、ユニークな数字に変更したいのですが、
hikashopの機能でユニークな注文番号を桁数指定して生成することはできますでしょうか？

デフォルトの{automatic_code}ですと２桁の英数字ですが、５桁のユニークな数字で生成できる方法を探しています。

ご教示お願いします。

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

- **[藤井律子](/forum/user/5783- "View 藤井律子's Profile")**
- [![藤井律子's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5783.jpg)](/forum/user/5783- "View 藤井律子's Profile")
- [ Offline](/forum/user/5783-)

Less More

- Posts: 301
- Thank you received: 24
-
-

10 years 10 months ago [\#224724](#224724) by [藤井律子](/forum/user/5783- "View 藤井律子's Profile")  Replied by *[藤井律子](/forum/user/5783- "View 藤井律子's Profile")* on topic *[注文番号をユニークにできますか](/forum/6-japanese-support/881153#224724 "-- HikaShop version -- : HikaShop Business 2.6.0 &#91;1511171458&#93; -- Joomla version -- : 3.4.5  いつもお世話になっております。  注文番号を{id}にしています。 連番になってしまいますので、ユニークな数字に変更したいのですが、 hikashopの機能でユニークな注文番号を桁数指定して生成することはできますでしょうか？  デフォルトの{automatic&#95;code}ですと２桁の英数字ですが、５桁のユニークな数字で生成できる方法を探しています。  ご教示お願いします。")*

yumikom 様

回答が遅れ、申し訳ございません。

お問い合わせの件ですが、{automatic_code} は２列ありません。
{automatic_code} は基本的に、order_id番号内に半ランダム状で文字を組み合わせたものとなります。
order_id 123の場合、 automatic codeは例えばA1B2C3になります。

「５列」は、注文番号を５文字＋５数字の組み合わせにしたいということでしょうか？
その場合ですと、MySQLクエリでorder_idを５数字まで増やして下さい。

同方法ですが、phymyadmin（データベース管理用にホスティング会社から提供されるツール）を開き、データベースを選択します。
次のクエリを実行し、hikashop_orderテーブルのauto_increment値を増加させます:

ALTER TABLE jos_hikashop_order auto_increment = 10000;

同クエリの結果は１００００から開始される注文IDとなり、５文字と５数字の注文番号が得られます。

---

Hikari software日本語カスタマー担当チーフ
藤井律子

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

10 years 10 months ago [\#224866](#224866) by [yumikom](/forum/user/39711-yumikom "View yumikom's Profile")  Replied by *[yumikom](/forum/user/39711-yumikom "View yumikom's Profile")* on topic *[注文番号をユニークにできますか](/forum/6-japanese-support/881153#224866 "-- HikaShop version -- : HikaShop Business 2.6.0 &#91;1511171458&#93; -- Joomla version -- : 3.4.5  いつもお世話になっております。  注文番号を{id}にしています。 連番になってしまいますので、ユニークな数字に変更したいのですが、 hikashopの機能でユニークな注文番号を桁数指定して生成することはできますでしょうか？  デフォルトの{automatic&#95;code}ですと２桁の英数字ですが、５桁のユニークな数字で生成できる方法を探しています。  ご教示お願いします。")*

藤井 様

注文番号の桁変更の方法をご教示いただきありがとうございました。

例）[U1Y0C007]
incrementを10000からにして、上記のような
ユニークな文字列 + order_id の組み合わせで発行することができました。

今後ともどうぞよろしくお願いします。

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzYtamFwYW5lc2Utc3VwcG9ydC84ODExNTM/dG1wbD1tYXJrZG93bg==) 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.172 seconds

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

[](#top)
