Adding characteristics to products

  • Posts: 57
  • Thank you received: 2
12 years 4 months ago #56279

Hi,

A strange issue has been encountered, since upgrading to 1.5.8, when adding characteristics to products.

After adding a Characteristic to a product and then going to the 'Manage Variants' screen only one variant is displayed. I've looked at the database hikashop_product table and sure enough there is only one variant listed.

I have created a new test product and a new test Characteristic but the issue persists.

I have a custom modification in administrator/components/com_hikashop/classes/product.php.function updateCharacteristics

$subplu=1;
foreach($keys as $key){
	//$product_code = $element->product_code.'_'.implode('_',$key); // original code
	$product_code =$element->product_code.str_pad($subplu,2,"0",STR_PAD_LEFT); // generate full plu
	$subplu++; // increment sub plu by 1 each time around

That creates product codes xxxx01, xxxx02, xxxx03 etc. I restored the original code but still the issue persists. Interestingly, as you can see from one of the images, the only variant present in the list is what should be the second variant created - I would expect it to be 9998887701, not 9997777702, as this is the first variant created by the code above.

Just to compound the issue, I have had it work as expected, only to use the same characteristic on another product and it not work. It fails far more often than it succeeds, though.

The default size drop down always shows the sizes available for the characteristic, but I guess that may be populated from the characteristic data rather than the product.








Please let me know if further information is required.

Regards,
Martyn.

Attachments:
Last edit: 12 years 4 months ago by expertbeginner.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #56327

What's interesting also is that the characteristic value is empty for the variant.

Could you try to turn on the debug mode of the joomla configuration and try again ?
Do you get an error ?
If not, could you copy/paste the queries that you get when you save the product after adding the characteristic ?

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 4 months ago #56336

Hi Nicolas,

Turned on debugging and tried as requested. No errors generated, but I have been able to get both a result and a failure using the same product and characteristics.

Success:



Failure


Attached are the database queries as separate files, one for the success and one for the failure, named accordingly.

In this case the success was achieved before the failure. I don't know whether this is of any relevance but on successful assigning of variants the lowest item code is at the bottom of the list with an ID of 1624 and on the later failure the item has the same ID

Many thanks for the speed response.

Regards,
Martyn.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #56418

Are you using the latest version of the administrator/components/com_hikashop/classes/product.php file ? Or the file of the previous version ?
If you're not using the latest version of the file, I would recommend you to switch to it.

I don't see any information which would allow us to help you. The fact that it works the first time and not the second time is a path to follow I think. Could you test more and see what happens ?
Does it happens for new products ? The first time ? The second time ? The third time ?
Do you delete the variants before deleting the characteristics when trying the second time and the third time ?

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 4 months ago #56431

Hi Nicolas,

Yes, it's the latest version of Hikashop. I always install the update and then edit the modified file afterwards, just in the event that there is a change to that particular file.

As suggested I've done some more testing:

Create a new product and assign a characteristic - the variants are generated okay
Delete the characteristic and assign the same characteristic - the variants are generated okay
Delete the characteristic and assign a different one - only one variant is generated and it has the same details (ID etc) as the last variant of the previous characteristic but no characteristic value.
Delete the characteristic and assign a different one - it can be the same as the one originally applied - only one variant is generated as the line above.
On the variants screen delete the single item that exists and return to the main product. Immediately delete the characteristic. Now add a new characteristic and the variants are generated as expected.

After deleting the characteristic and then going to the 'Manage Variants' page, it displays the "You need to create characteristics" message. Returning to the main product page and then adding a new characteristic has resulted in the variants being generated each time I've tried.

It's only a hunch but to me it seems that there is some remnant of last variant hanging around after the characteristic has been deleted that is the cause of the issue.

I hope this assists and if there is anything else that you need or I can do, let me know.

Regards,
Martyn.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #56478

Hi,

Thank you for the thorough report. We fixed that on our end and it will be in next version of HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 4 months ago #56573

Hi,

Glad to be of assistance.

Regards,
Martyn.

Please Log in or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 12
12 years 4 months ago #57080

I suspect this was happening in 1.5.7 also.

When ever I play with characteristics, I have to be very thorough at saving after every stage. Even then it seems to screw up sometimes.

Look forward to seeing it more stable.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #57153

Yes, this was the case since HikaShop 1.0.0 I think :)

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 1
12 years 3 months ago #61051

I think I have a very similar issue.
While I am editing text and price of variants, suddenly only one variant remains (other variants disappear).
I can't really understand at what point they do disappear, but it happens somewhere between changing from editing variants and back to main product.
From your post I understand the issue has to be corrected long ago. However, I am using today's version of Business Edition and the issue still persists.
Can you suggest any hint?
I attach the screenshots that I have as result of managing variants..

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 1
12 years 3 months ago #61058

I have played around a little bit more with video capturing.
Hika's behaviour is very strange. Please look at the below two videos.
Please, note that I have just installed a business edition of H/S and have not altered it in no way.
Most often the issue appears after I update product page at front end and then return to back end...

www.youtube.com/watch?v=tfNrHJSvyDc&feature=youtu.be

www.youtube.com/watch?v=0mIBs9avQWg&feature=youtu.be

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #61068

Hi,

If it is the same problem that you are having, then no the issue hasn't been fixed - it is to be included in the next version (see post #56478)

The posting that you may be referring to regarding the fix (#57153) is in fact acknowledging that the bug existed since version 1.0.0

Regards,
Martyn

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 1
12 years 3 months ago #61109

Hi Martyn,
I don't think so. The post saying that the issue will be fixed within next release was dated beginning of July.
The latest version of HikaShop is dated by July 22nd.
This means your fix had to be included into the latest release.
Wasn't it? Shall I don't panic and just wait few more weeks? :)

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #61112

Hi,

It was since upgrading to 1.5.8 that the issue was spotted and reported. According to the installation on the website the latest version is 1.5.8. So I guess that the latest release, with the bug-fix, has not yet been released. No doubt one of the mods will correct this if I'm wrong.

I'd wait before panicking :)

Regards,
Martyn.

Please Log in or Create an account to join the conversation.

  • Posts: 120
  • Thank you received: 1
12 years 3 months ago #61114

Martyn,

Thanks. Noted.
Its a pity.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61122

Hi,

These are new bugs introduced with 1.5.9 because we changed the characteristic handling in order to be able to properly regenerate variants when you add a second characteristic which wasn't handled before.
From what I can see in your videos, it broke other stuff but the problem first raised on this thread was included in 1.5.9 which was released last week.
We'll have the two bugs you found fixed on Tuesday when he gets back from holidays and we'll probably publish a new release following that with all the other bug fixes that we had to do since last week.

The following user(s) said Thank You: watashi

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #61171

Hi Nicolas,

Was 1.5.9 not released as a stable release, then? I've just this minute checked the "About/Update" page on the installation and it shows "You have the latest stable version : 1.5.8". No upgrade to 1.5.9 is mentioned or offered.

Regards,
Martyn.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #61251

The 1.5.9 is not yet available for the auto update as explained in the changelog that you can see when you go to the update menu:
HikaShop 1.5.9

Release date : August, 15 2012 (The new version is not yet available for auto update. It will be in a few days. Once we are sure that everything is OK. If you really want to update in the mean time, you can download the package from our website and install the new package manually)

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #61344

Hi Nicolas,

Thanks for the info. I generally check for and apply updates via the Auto-update and so wasn't aware that 1.5.9 had been released. As a result watashi was referring to 1.5.9 and I to 1.5.8 and a little bit of confusion started to arise around the version number.

Regards,
Martyn.

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
12 years 3 months ago #61350

watashi wrote: I have played around a little bit more with video capturing.
Hika's behaviour is very strange. Please look at the below two videos.
Please, note that I have just installed a business edition of H/S and have not altered it in no way.
Most often the issue appears after I update product page at front end and then return to back end...

www.youtube.com/watch?v=tfNrHJSvyDc&feature=youtu.be

www.youtube.com/watch?v=0mIBs9avQWg&feature=youtu.be


Everything is working fine when we try this here. Could you please give me an access to your backend so I could check directly on your website?
If you're ok with that, just send me a PM :).

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Powered by Kunena Forum