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

#   product template problem

##

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 months ago [\#167911](#167911) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  *[product template problem](/forum/23-market-how-to/870445-product-template-problem#167911 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")* was created by *[christofu](/forum/user/31338-christofu "View christofu's Profile")*

-- HikaShop version -- : 2.3.2
-- HikaMarket version -- : 1.4.3
-- Joomla version -- : 3.3.3

Hi,
I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?

when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.

Is this expected behaviour for the Template?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago -  12 years 3 months ago [\#167917](#167917) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#167917 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

Thanks for the report.
You're right, it's an unexpected behaviour of the product template system.
I will fix and update the HikaMarket package as soon as possible.

You can edit the file "administrator/components/com_hikamarket/classes/product.php" and replace Code:

$template = $this-&gt;getRaw($template_id, true); foreach($template as $k =&gt; $v) { if(!isset($product-&gt;$k)) $product-&gt;$k = $v; }

By Code:

$template = $this-&gt;getRaw($template_id, true); foreach($template as $k =&gt; $v) { if(!in_array($k, array('product_code')) &amp;&amp; !isset($product-&gt;$k)) $product-&gt;$k = $v; }

It will exclude the "product_code" from the product template while creating a new product.

Regards,

---

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

Last edit: 12 years 3 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: code fix

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 months ago [\#167934](#167934) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#167934 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

thanks, I replaced that and received this error when I tried to add a new template:
Parse error: syntax error, unexpected '$product' (T_VARIABLE) in /home/siftmrkt/public_html/administrator/components/com_hikamarket/classes/product.php on line 320

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 months ago [\#167935](#167935) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#167935 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

in fact the error occurs on every page - so I rolled it back to the original code for now

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#167960](#167960) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#167960 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

I fixed the code in my previous post.

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 months ago [\#168299](#168299) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#168299 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi Jerome,

yes that worked for the code - brilliant:)

I noticed the Alias also automatically defaults to a variation of the template name - is that able to dynamically change to a variation of the new product name instead? (which will automatically change based on duplicate product names so it doesnt have to be exact)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#168304](#168304) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#168304 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

Well, we can also include the product_alias in the list of exclusion. Code:

if(!in_array($k, array('product_code', 'product_alias')) &amp;&amp; !isset($product-&gt;$k))

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 months ago [\#168371](#168371) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#168371 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

hmm just recieved a general error after adding that one:

"An error occured while saving the product"

tried adding a new Template with the same error

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#168383](#168383) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#168383 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

It means that I should make some tests in order to understand what happened (because like that, I can't say).
The best will be to revert the latest modification in order to keep the "product_alias", so you will be able to save items correctly.

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 months ago [\#170203](#170203) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170203 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi Jerome I added the code you suggested (for alias) underneath:

else
$vendor-&gt;alias = JFilterOutput::stringURLSafe(strip_tags($vendor-&gt;alias));

I am not sure if this is correct?

result is there is no error but there is no change in the alias behaviour. Every product assumes the alias (and hence page URL) of the product template, resulting in every created product pointing towards only 1 product. I have the program set to automatically generate the alias from product name, so it seems with a template it automatically generates the alias from the template name instead!

When I dont have a Template it generates the alias correctly

I am just using the template to set certain values when somebody adds a product

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 2 months ago [\#170253](#170253) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170253 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

Can you tell me more about the "program" which automatically generate the alias ?
Because the patch I gave you in this thread should work ; I don't understand your problem and as you know, I can't reproduce it.

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 months ago [\#170352](#170352) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170352 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

in Hikashop / Config / features / SEF url options you can set Alias to be filled automatically.  [ ![hikaskop-config-features-SE.jpg](/forum/attachment/19426) ](/forum/attachment/19426 "...eatures-SE.jpg")

This is working fine.
Its just when I use the Product Template any product I create takes on the alias of the product Template name

The code you gave me above might fix it, I was just unsure where to place it (that is certainly not my strong point) - if you could help me regarding the placement that would be great:)

thanks

- [ ![hikaskop-config-features-SE.jpg](/forum/attachment/19426) ](/forum/attachment/19426 "...eatures-SE.jpg") [ ](/forum/attachment/19426?download=1 "...eatures-SE.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 2 months ago [\#170362](#170362) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170362 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

The code I gave you will fix it.
But I though you already used it...

In my first reply in this thread, I gave you 4 lines to replace ; and in the next reply, I gave you one line to change in the previous 4 lines.
I did not specified the replacement because it was from the previous message (like I wrote in that message).
So please, use the modification.

Regards,

---

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

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 months ago [\#170512](#170512) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170512 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Thanks Jerome,

not my strong point so your last comment cleared up what do with the code &amp; it works! I presume you will update in the next version so I dont need to create an override file?

thanks again for your help :lol:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 2 months ago [\#170513](#170513) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#170513 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

Yes, the code is already committed for the next release.

Regards,

---

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

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 months ago [\#172724](#172724) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#172724 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,
I had to upgrade to the newest version of Hikamarket to resolve some other problems - in doing so I have had some issues pop up with my product template file resulting in either:
1. the product assumes the name of the product template (instead of its own name)
or
2. the product assumes the correct name but there is a 404 error
I have removed the product template to test adding a product without and it has the same results
I have checked the code above is in the updated edition and it is (though I had to add the product alias addition)
is this a familiar error?

- [ ![addnewproduct-problem.jpg](/forum/attachment/19754) ](/forum/attachment/19754 "...ct-problem.jpg") [ ](/forum/attachment/19754?download=1 "...ct-problem.jpg")
- [ ![product-list-problem.jpg](/forum/attachment/19755) ](/forum/attachment/19755 "...st-problem.jpg") [ ](/forum/attachment/19755?download=1 "...st-problem.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 2 months ago [\#172725](#172725) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#172725 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

We are building a new version which should be release tomorrow.

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 1 month ago [\#173043](#173043) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#173043 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi Jerome,
is the 1.4.4 that is available now the latest version?
I have tried updating and I am still getting some familiar errors...
thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODcwNDQ1LXByb2R1Y3QtdGVtcGxhdGUtcHJvYmxlbT9zdGFydD0wJnRtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 1 month ago [\#173065](#173065) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#173065 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,

The exact same problems than in your previous post ?
I tried to reproduce it but I couldn't. I think I don't have the same "product template" configuration than yours.

Regards,

---

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

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

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

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 1 month ago [\#173104](#173104) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[product template problem](/forum/23-market-how-to/870445-product-template-problem#173104 "-- HikaShop version -- : 2.3.2 -- HikaMarket version -- : 1.4.3 -- Joomla version -- : 3.3.3  Hi, I have used the product template to force some values for certain fields. when I dont use the template my product code is automatically generated from the title, and it seems the product URL is generated from the Alias?  when I do use the product template the URL appears to come from the name of the Template (rather than the product name) and the code is equal to the code that is automatically generated for the Template e.g. @template-53c5bb2e6c4b8 - which it tries to duplicate every time you add a product.  Is this expected behaviour for the Template?")*

Hi,
yes its the same problem - i.e. the same error at the top of page when you add a new product "Warning: Creating default object from empty value in /home/siftmrkt/public_html/components/com_hikamarket/views/productmarket/view.html.php on line 487"

I had removed the product template altogether to test first, and I have these problems:

- add product form has error at the top (as per my above images) but it saves the product
- when you access the product it brings up a 404 error

so perhaps the product template is ok, but it is something else?

the error started when I updated to the latest 1.4.3, and still exists when I updated to 1.4.4 today

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

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.102 seconds

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