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

#   Variant prices

##

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

Less More

- Posts: 16
- Thank you received: 0
-
-

13 years 6 months ago [\#101501](#101501) by [Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")  *[Variant prices](/forum/4-how-to/81168-variant-prices#101501 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")* was created by *[Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")*

Hi,

I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.

I want to know if i can get those prices via array.

Like : variants[0]-&gt;prices[1] (for the variant "1 year" and get its second price)
variants[1]-&gt;prices[2] (for the variant "2 years" and get its third price)

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxMTY4LXZhcmlhbnQtcHJpY2VzP3RtcGw9bWFya2Rvd24=) 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 6 months ago [\#101526](#101526) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101526 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

Hi,

Yes, you can do that.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

13 years 6 months ago [\#101530](#101530) by [Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")  Replied by *[Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101530 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

Hello,

Thank you for the reply.

What is the exactly "pattern" i can get the price ? I mean which array ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgxMTY4LXZhcmlhbnQtcHJpY2VzP3RtcGw9bWFya2Rvd24=) 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 6 months ago [\#101558](#101558) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101558 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

You already gave the "pattern" on your first message so I'm not sure I understand what you want ?

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

13 years 6 months ago [\#101640](#101640) by [Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")  Replied by *[Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101640 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

I want to know if there is a way to access the variant's price via array in php.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 6 months ago [\#101651](#101651) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101651 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

Hi,

Sure, but where do you want to access to your product variants prices ?

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

13 years 6 months ago [\#101998](#101998) by [Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")  Replied by *[Wewic24](/forum/user/16476-wewic24 "View Wewic24's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#101998 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

Hello,

We found another solution, i just created variants and gave them the prices.

Thanks for your help !

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 6 months ago -  13 years 6 months ago [\#102001](#102001) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Variant prices](/forum/4-how-to/81168-variant-prices#102001 "Hi,  I have a product with 2 variants (1 year and 2 years) and the first one has 3 prices.  I want to know if i can get those prices via array.  Like : variants&#91;0&#93;-&gt;prices&#91;1&#93; (for the variant &quot;1 year&quot; and get its second price) variants&#91;1&#93;-&gt;prices&#91;2&#93; (for the variant &quot;2 years&quot; and get its third price)  Thanks")*

Glad to know that you found a solution ![:)](/media/kunena/emoticons/3.png ":)").

Last edit: 13 years 6 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

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

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

[](#top)
