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

#   dynamic options on product

##

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

Less More

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

13 years 11 months ago [\#73585](#73585) by [mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")  *[dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#73585 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")* was created by *[mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")*

Hi,

i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content.
What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.

For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.

Is that possible with HikaShop?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczNTg1LWR5bmFtaWMtb3B0aW9ucy1vbi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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 11 months ago [\#73725](#73725) 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 *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#73725 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

Hi,

I don't think that it's possible with customfield without some developpment ![:)](/media/kunena/emoticons/8.png ":)").

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

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

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

Less More

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

13 years 11 months ago [\#74514](#74514) by [mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")  Replied by *[mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")* on topic *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#74514 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

We got stuck on the problem with the dynamic options. We dont want to "hack" the hikashop core files and now we got the idea to add the dynamic options within a plugin.

The workflow would be this:
The customer selects the dynamic options from a seperate menu which we integrate in a joomla module.
Then he selects the standart options and puts the product into the cart.
At this point our plugin would have to jump in and add the dynamic options.

Could we try this and does a function for adding options to an ordered product exist?
And if this is possible the way we planned, which trigger function should we use? We thought on the onBeforeProductCreate(&amp;$element,&amp;$do) function.
So we would need to create a function like $element-&gt;addCharacteristic($name, $value);

Moritz

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczNTg1LWR5bmFtaWMtb3B0aW9ucy1vbi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

13 years 11 months ago [\#74621](#74621) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#74621 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

You don't need to hack the hikashop files. You can just edit the file "show_default" via the menu Display-&gt;Views and add your code there to display the dropdowns based on the existing ones. The modifications will be created as a view override so no hack of core file here.

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

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

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

Less More

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

13 years 11 months ago [\#74728](#74728) by [mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")  Replied by *[mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")* on topic *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#74728 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

Does a function/trigger exist, which is called, when a customer puts a product into the cart? We thought that would be the onBeforeCreateProduct() function, but that seems wrong ![:(](/media/kunena/emoticons/5.png ":(")
We still need a place where we can add additional values from our database to a product and we thougt the best way would be to do that just before putting the product into the cart.

I am sorry if you tried to explain this already ![;)](/media/kunena/emoticons/11.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczNTg1LWR5bmFtaWMtb3B0aW9ucy1vbi1wcm9kdWN0P3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

13 years 11 months ago [\#75631](#75631) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#75631 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

onBeforeCreateProduct is called when a product is created.

If you want a trigger for when products are added tot he cart, it's the triggers onBeforeCartUpdate and onAfterCartUpdate
They are not yet documented.

Here is how you can do:

function onBeforeCartUpdate(&amp;$parent, &amp;$cart, $product_id, $quantity, $add, $type,$resetCartWhenUpdate,$force,&amp;$do) {
}

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

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

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

Less More

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

13 years 11 months ago [\#75709](#75709) by [mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")  Replied by *[mobe84](/forum/user/10689-mobe84 "View mobe84's Profile")* on topic *[Re: dynamic options on product](/forum/4-how-to/73585-dynamic-options-on-product#75709 "Hi,  i have a question about product options. I already created some products with options like color or size and saw that the business version of HikaShop enables you to make a custom field where the customer can type in some content. What i need is an option for the product where the customer can choose (dropdown for example) from dynamic created values like user created joomla articles.  For example: The user owns various articles on our site and for a specific product we want him to choose one of his articles for a product. So we need an option in the product view for selecting his articles.  Is that possible with HikaShop?")*

thank you!

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

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

[](#top)
