Issue with unpublished variants

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
11 years 2 months ago #18140

Hi Nicolas

I read the recent thread on this but this change presents us with a huge problem - we would have to go through over 2000 listings deleting variants where we either have no stock currently or where the variant is not published for a particular product because it does not apply, and where the variants are currently set as unpublished. Why do variants that are not published have to show at all in the front end? - they did not do so before this latest update. The alternative would be to create hundreds of different variant sets - but that seems an unacceptable option - the variants worked perfectly before.

The impact on our sales is substantial because suddenly more than half the items visitors are clicking on have no stock because variants that were previously unpublished are now showing. This is a really serious problem!

If this is not fixable can I please have a clean copy of the last essential version software before this alteration so that I can backtrack. I was using 1.4.9, but the version I have on disc is prior to some fixes you made to discounts, etc.

Thanks

Chris

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
11 years 2 months ago #18152

Deleting all the variants which are unpublished or without a quantity is quite easy. You can just go in your phpmyadmin and run the query:
DELETE FROM jos_hikashop_product WHERE product_type='variant' AND (product_published=0 OR product_quantity=0)

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

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
11 years 2 months ago #18178

Hi Nicolas,
I realise that deleting would not be too difficult, but this effectively breaks the system we are using. To explain: fishing flies come in different patterns (many hundreds) each pattern can be available in many variants of hook size. Popular patterns can be available in 6 or more different sizes, less popular patterns in just 1, 2 or maybe 3 sizes. The combinations are almost endless so, rather than set up variant tables for every different possible combination we have created a limited number of size variant options, each dealing with a range of sizes for different categories of fly types. So, for our most popular pattern types we have a variant 'Hook Sizes' with sizes 10, 12, 14, 16, 18 and 20 defined. When creating a listing for the shop my customer inputs all the details about the fly pattern and simply selects the variant 'hook sizes' and then publishes only the variant sizes that are available for sale. Up till now the variant drop down on the product page in the front end has only showed the selected variants. Mostly, but not in all cases, they are not using using stock control and simply have the stock set as unlimited - when a particular variant size of a pattern is temporarily unavailable they simply unpublish the variant until new stock arrives - this has worked really well up till now - easy to do and very logical, after all unpublished items in Joomla and Hikashop do not show in the front end (at least until now!)

If we simply delete the variants from the database where items are currently unpublished, either because a size for any particular line item pattern is unavailable, or because that particular size is not a current sale item (but may be next week depending what the fly tiers produce), then my customer is going to have to continually be recreating products and variants, and deleting variants on a sales range of thousands of items/variants on a daily basis as stock supplies move in and out - this is a huge potential work load and very very inefficient.

I cannot understand why it is necessary or desirable to have an unpublished variant show up in the front end? After all, in Hikashop, if you unpublish a product it no longer shows in the front end (logical) - now, if you unpublish a variant it does show in the front end (illogical) - it worked fine the way it was, why change?

My customer is badly affected by this change in how unpublished variants are handled - his sales range has suddenly increased by around 70% with previously invisable product variants becoming visable to customers - now 7 times out of 10 what they click on simply shows no stock - so they get very frustrated and go somewhere else to shop - my customer is losing a lot of business. We need to find a way round this very urgently.

In the meantime I would like to revert the shop to the last version prior to this change - can I please have a download of the last essential version prior to this change, as I mentioned the version of 1.4.9 I have on disc is prior to the fixes you did for us to correct the discounts problems a while back.

Thanks for your urgent attention.

Rgs
Chris

Last edit: 11 years 2 months ago by chris711. Reason: corrected literals

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
11 years 2 months ago #18193

I did not see your case as a problem when changing the system since it just changes the publish/unpublish to delete/create method. Also, it would also be possible to handle it with the stock: if the stock is 0, the product can't be bought so anyway, that would also have been a solution.

The system was changed because of another problem. When you have several characteristics for a product, you could have unpublished variants which could still be selected by the user. However, on that case, even though the add to cart button was deactivated, the information displayed was then default one (from the main product) and not the information of the unpublished variant because rightfully, the data wasn't loaded. But then, the price displayed wouldn't be the normal price of the variant but another price. We found that solution as a good alternative to the problem which would enable the user to still display the correct information of a variant even thought it would be unpublished.
I can't see a solution which would allow both cases to work...We can't make the system to be nice with everything... At one point there must be a compromise...Or we could add yet another option to have both modes possible...I sent you the install package of the 1.4.9 version so that you can revert to that previous version.

Remember that for any update/install of any extension on a production website, you should first do a backup. It's not because there are usually no problems that it should not be done.

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

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
11 years 2 months ago #18196

Thanks for the explanation and for the download file which I have restored.

I see why you have changed the system but in reality you are probably going to cause more problem than you are curing, particularly as the change works opposite to normal publish/unpublish conventions. In a perfect world I guess you would have an option to allow switching on the non-standard handling of unpublish for variants.

I will look forward to seeing if you can come up with a solution that suits all - meanwhile I will stay with 1.4.9.

Thanks as usual for the help.

Regards
Chris

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

  • Posts: 180
  • Thank you received: 13
10 years 2 months ago #50212

I know this is an old thread, but it has described the issue very well.

The deletion is to me overkill and unsatisfactory. There will be cases that the variants will have a different descriptions, and in virtually all cases they will have different pictures. Asking the client to 'delete' the variant that is to be unpublished and then to simply create it again is totally undesirable, especially where there are hundreds or even thousands of products involved.

To my mind, 'unpublished' should just mean that. It should meant a variant that is not published, is not available from any point on the front end, and that would mean if there are no published variants of a particular characteristic, that characteristic should not be available as a choice.

Am I the only one with this view? And has there been a solution to this issue since the thread was started?

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

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
10 years 2 months ago #50216

As far as we know a satisfactory solution has not been found - since raising the thread we have had to comply with the deletion/creation route which, as you rightly note, is a lot of work when you you have thousands of products/variations. Hope the fact someone else is now raising this issue will bring a good solution.

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

  • Posts: 180
  • Thank you received: 13
10 years 2 months ago #50219

I do not have an issue with the complexity of the deletion, which seemed to be the response for a couple of other similar threads. Indeed running a delete SQL statement is fairly easy (and hopefully you have the statement correct :) ) But when you have fields available for the variations, where you can add further details of what the variations are, you are going to lose that data and will have to go through the process of re-creating them when you republish. There is no way that all clients will accept a solution which is dictated by (IMHO) a technical decision rather than what should be a business workflow decision.

It puts a spanner in an otherwise great implementation of variants. It is the best I have seen on e-commerce solutions and in fact was one of the main reasons that i chose Hikashop in the first place.

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
10 years 2 months ago #50309

Indeed, we are well aware that this should be improved. But remove the variants in the dropdowns of characteristics based on the variants is not easy. It requires, dynamic replacement of the characteristic dropdowns.
We unfortunately had other priorities so far but it's still in the todo list.

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

  • Posts: 180
  • Thank you received: 13
10 years 2 months ago #50333

Thank you for your, as ever, prompt reply Nicolas.

I was not referring to a dynamic pop-up, which with multiple characteristics will cause all sorts of confusion for the use, not to mention in the code.

What I am saying is that any characteristic value, which is not in use as a published variant, in any combination, should not appear in a popup on the product.

E.G. I have the following:

SizeColourPublished
MRedYes
MBlueYes
MWhiteYes
LRedYes
LBlueYes
LBlackNo

Black should not be in the colour pop-up. The popup should be "Blue, Red, White".

I am not certain how the selection for the pop-up is currently done, but I would base it on a join to the variants of the parent product.

The SQL example would be:
  select c.characteristic_id, c.characteristic_value 
  from hikashop_characteristic c, hikashop_variant v, hikashop_product p
  where c.characteristic_parent_id = $characteristictypeid
  and v.variant_characteristic_id = c.characteristic_id
  and v.variant_product_id = p.product_id
  and p.product_parent_Id = $productparentid
  and p.product_published =1
That should give you a quick short list to stick in an array without having to remove any elements. It also does not matter if they are or are not in use in a combination with other characteristic types.

Having said that you, know your product better than I so I shall wait for you to reach the point in your to do list :)

I hope I do not come across as too critical of Hikashop, as I think it is an excellent product. I am just looking to make it even better ;)

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
10 years 2 months ago #50426

Yes, that's also in the todo list.

The following user(s) said Thank You: esotechie

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

  • Posts: 377
  • Thank you received: 7
8 years 3 months ago #153853

Has this been updated yet as i have unpublished variants and they still show in the drop down when i would not like them to be showing as not all products use the variants, however it would be more time consuming to create a variant group for each product ranges colour.

Ideally I want to create the variant 'color' with say 50 colour values then one product may have 6 options. I would like to then be able to just add the variant colour to that product, go into the manage variants then unpublish all, then tick (publish) the 6 colours that apply to this product... Repeating this process with each product. It seems backward to have to create all the products then go through and tick each 54 variants and delete those, also the vairants cannot be ordered by name, this makes it much more time consuming to go through and find those which need to be ubpublished, it would be quicker if i could look at them alphabetically?

Kind regards

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

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
8 years 3 months ago #153859

I also would still be very keen to see a solution to this as the delete recreate process is a real pain.

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

  • Posts: 377
  • Thank you received: 7
8 years 3 months ago #153888

Hi Chris,

I think the general solution to this one is to change settings for products with no stock to not display in the main hikashop config, the unpublish element doesn't unpublish but seems to represent no stock instead. So thats how we got around it.

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

  • Posts: 92
  • Thank you received: 3
  • Hikashop Business
8 years 3 months ago #153892

Hi Dibben,
That is exactly what we do currently - I would still however like to see a solution which would allow 'unpublished' to really mean unpublished - so that only published variants show on the front end in product selection dropdowns, etc.
Chris

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

  • Posts: 377
  • Thank you received: 7
8 years 3 months ago #153920

I agree that would be the ideal scenario!

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
8 years 3 months ago #153875

Hi,

If you turn off the "display out of stock" option of the configuration, you won't see the variants without stock or unpbulished variants in the characteristic dropdowns of the products.

If you always need to have a small percentage of the variants for each product, then you should turn off the option "Generate variants automatically" of the configuration so that the variants are not generated automatically and then just click on the "new" button of the variants listing to create the variants you need.

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

  • Posts: 377
  • Thank you received: 7
8 years 3 months ago #154108

Thank you Nicolas,

I still have a problem with it generating random prices on the variants but due to it being such a small number i can manually adjust those however i am pretty sure it isn't supposed to work that way.

Kind regards

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

  • Posts: 6
  • Thank you received: 0
7 years 11 months ago #169473

I know this is an older thread but having just run across this as I'm building out my shop, I found the best way to handle this with the thousands of unpublished variants was to use an MySQL statement not to delete them but to set the access level to ,8., /superuser. This way I don't have to reenter variants that become active again. I just change the ACL to 'all'

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

  • Posts: 329
  • Thank you received: 6
  • Hikashop Business
6 years 9 months ago #217964

Hi,

Does this:

If you turn off the "display out of stock" option of the configuration, you won't see the variants without stock or unpbulished variants in the characteristic dropdowns of the products.


Work with multiple variants of the same product? e.g. colour and size?

Many thanks.

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

Time to create page: 0.121 seconds
Powered by Kunena Forum