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

#  Profile for DomB22

##

[![DomB22's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/82577-domb22 "View DomB22's Profile")

**[ Offline](/forum/user/82577-domb22)**

- **User Type:** User

- **Register Date:** 01 Jul 2024
- **Last login:** 2 years 4 months ago
- **Time Zone:**  UTC +0:00
- **Local Time:** 04:37

- **Posts:** 9
- **Profile views:** 48
- **Thank you received:** 1

- **Gender:** Unknown
- **Birthdate:** Unknown

- Posts

#  DomB22's recent posts  (9 messages )

All Since last visit 4 Hours 8 Hours 12 Hours 24 Hours 48 Hours Week Month Year     All Since last visit 4 Hours 8 Hours 12 Hours 24 Hours 48 Hours Week Month Year

| <a id="forumtop"> </a> [  ](#forumbottom) | Subject | Replies / Views | Last Post | <a id="forumbottom"> </a> [   ](#forumtop) |
|---|---|---|---|---|
| [](/forum/31-development/908359-creating-variants-programmatically#362173) | [Creating variants programmatically](/forum/31-development/908359-creating-variants-programmatically#362173 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I want to create products in a plugin which can be either parents or variants (children) I've got running the basics of creating a product with categories etc. and I know that characteristics are used to specify variants. Here are my questions: &#42;when I create a parent, I need to specify whch characteristic(s) can be used to create a variant and the default value for each. I suspect that I must use $productClass-&gt;updateCharacteristics but how ? &#42;when I create a variant I set its parent with something like $product-&gt;product&#95;parent&#95;id = 127 (looking at the code for -&gt;save() in classes/product.php. The product&#95;type is then set automatically). I also need to specifiy the actual value of each characteristic but how? Advice from seasoned programmers would be appreciated, thank you")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:7  Views:1046 | [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171) | [Creating products programmatically / miscellaneous questions](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  I'm writing a plugin which creates products. I've managed to add categories, various prices levels, custom fields and at this time I still have two questions : - is it possible to generate automatically a product&#95;alias upon creation? - how is it possible to add multilingual versions (in my case en-GB and fr-FR) of the half-dozen translatable product fields? By the way, is it possible to make a 'text' custom field multilingual?")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171 "Following your answers it works fine, thank you for the great support Nicolas.") 2 years 4 months ago     by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile") | Replies:2  Views:889 | [Last Post](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171 "Following your answers it works fine, thank you for the great support Nicolas.") by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")      2 years 4 months ago |
| [](/forum/31-development/908359-creating-variants-programmatically#362166) | [Creating variants programmatically](/forum/31-development/908359-creating-variants-programmatically#362166 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I want to create products in a plugin which can be either parents or variants (children) I've got running the basics of creating a product with categories etc. and I know that characteristics are used to specify variants. Here are my questions: &#42;when I create a parent, I need to specify whch characteristic(s) can be used to create a variant and the default value for each. I suspect that I must use $productClass-&gt;updateCharacteristics but how ? &#42;when I create a variant I set its parent with something like $product-&gt;product&#95;parent&#95;id = 127 (looking at the code for -&gt;save() in classes/product.php. The product&#95;type is then set automatically). I also need to specifiy the actual value of each characteristic but how? Advice from seasoned programmers would be appreciated, thank you")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:7  Views:1046 | [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362023) | [Creating products programmatically / miscellaneous questions](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362023 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  I'm writing a plugin which creates products. I've managed to add categories, various prices levels, custom fields and at this time I still have two questions : - is it possible to generate automatically a product&#95;alias upon creation? - how is it possible to add multilingual versions (in my case en-GB and fr-FR) of the half-dozen translatable product fields? By the way, is it possible to make a 'text' custom field multilingual?")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171 "Following your answers it works fine, thank you for the great support Nicolas.") 2 years 4 months ago     by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile") | Replies:2  Views:889 | [Last Post](/forum/31-development/908380-creating-products-programmatically-miscellaneous-questions#362171 "Following your answers it works fine, thank you for the great support Nicolas.") by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")      2 years 4 months ago |
| [](/forum/31-development/908359-creating-variants-programmatically#362019) | [Creating variants programmatically](/forum/31-development/908359-creating-variants-programmatically#362019 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I want to create products in a plugin which can be either parents or variants (children) I've got running the basics of creating a product with categories etc. and I know that characteristics are used to specify variants. Here are my questions: &#42;when I create a parent, I need to specify whch characteristic(s) can be used to create a variant and the default value for each. I suspect that I must use $productClass-&gt;updateCharacteristics but how ? &#42;when I create a variant I set its parent with something like $product-&gt;product&#95;parent&#95;id = 127 (looking at the code for -&gt;save() in classes/product.php. The product&#95;type is then set automatically). I also need to specifiy the actual value of each characteristic but how? Advice from seasoned programmers would be appreciated, thank you")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:7  Views:1046 | [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908359-creating-variants-programmatically#361937) | [Creating variants programmatically](/forum/31-development/908359-creating-variants-programmatically#361937 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I want to create products in a plugin which can be either parents or variants (children) I've got running the basics of creating a product with categories etc. and I know that characteristics are used to specify variants. Here are my questions: &#42;when I create a parent, I need to specify whch characteristic(s) can be used to create a variant and the default value for each. I suspect that I must use $productClass-&gt;updateCharacteristics but how ? &#42;when I create a variant I set its parent with something like $product-&gt;product&#95;parent&#95;id = 127 (looking at the code for -&gt;save() in classes/product.php. The product&#95;type is then set automatically). I also need to specifiy the actual value of each characteristic but how? Advice from seasoned programmers would be appreciated, thank you")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:7  Views:1046 | [Last Post](/forum/31-development/908359-creating-variants-programmatically#362177 "Hi,  You would use the same updateCharacteristics function with the $product-&gt;characteristics array set with the new characteristic values. That's what is done in the backSaveVariantForm function of the same class which is called when you save a variant edit form in the backend since this interface allows you to change the values of a variant. So you can look in this backSaveVariantForm. Now, most of the code in there is irrelevant. It's the piece inside the which you want to look at.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908338-using-the-field-class#361825) | [Using the "field" class](/forum/31-development/908338-using-the-field-class#361825 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I'm a relative beginner with Hikashop but I've experience with Woocommerce. For a plugin development project I need to interact with the hikashop&#95;field table. More precisely I want to retrieve all the values of a singledropdown field based on its field&#95;realname and then update them. I understand that I must start with hikashop&#95;get('class.field'); but then I'm lost ; I've looked into the code of com&#95;hikashop/classes/field.php but without success (and because it extends hikashopClass maybe the answer is in the base class) Any pointer would be appreciated, thank you.")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:4  Views:740 | [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908338-using-the-field-class#361823) | [Using the "field" class](/forum/31-development/908338-using-the-field-class#361823 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I'm a relative beginner with Hikashop but I've experience with Woocommerce. For a plugin development project I need to interact with the hikashop&#95;field table. More precisely I want to retrieve all the values of a singledropdown field based on its field&#95;realname and then update them. I understand that I must start with hikashop&#95;get('class.field'); but then I'm lost ; I've looked into the code of com&#95;hikashop/classes/field.php but without success (and because it extends hikashopClass maybe the answer is in the base class) Any pointer would be appreciated, thank you.")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:4  Views:740 | [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |
| [](/forum/31-development/908338-using-the-field-class#361814) | [Using the "field" class](/forum/31-development/908338-using-the-field-class#361814 "-- HikaShop version -- : 5.1.0 -- Joomla version -- : 4.4.5  Hello, I'm a relative beginner with Hikashop but I've experience with Woocommerce. For a plugin development project I need to interact with the hikashop&#95;field table. More precisely I want to retrieve all the values of a singledropdown field based on its field&#95;realname and then update them. I understand that I must start with hikashop&#95;get('class.field'); but then I'm lost ; I've looked into the code of com&#95;hikashop/classes/field.php but without success (and because it extends hikashopClass maybe the answer is in the base class) Any pointer would be appreciated, thank you.")        Category: [Development](/forum/31-development "If you are developping a plugin for Hikashop or customizing our component, this is the board to be.")     Topic started 2 years 4 months ago, by [DomB22](/forum/user/82577-domb22 "View DomB22's Profile")       [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") 2 years 4 months ago     by [nicolas](/forum/user/63-nicolas "View nicolas's Profile") | Replies:4  Views:740 | [Last Post](/forum/31-development/908338-using-the-field-class#361826 "Hi,  Ah right, I forgot about the save part. You can't use the save method directly. The field&#95;value attribute is discarded because it isn't in a valid form. You need to set the field&#95;value in the format that is the same as what you can see in the database. So you'll have to do something like this:  Then, the save call will take into account the field&#95;value.  The addValue method is actually way better for adding / updating values. I had forgotten about it.") by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")      2 years 4 months ago |

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.077 seconds

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