- Posts: 135
- Thank you received: 3
Default value for variants
- simonkloostra
-
Topic Author
- Offline
-- Joomla version -- : 3.8.0
-- PHP version -- : 7.1
-- Browser(s) name and version -- : all
I now have my "product variants" set up using custom fields as in he attachment, but since I will probably outsource my fulfillment I need a more structural way of setting this up, using 'real' variants. See the attachment for my current display.
Doing so seems to work fine, except for one thing. I want to force people to make a decision about a size or color. Now with custom fields I manage doing so with a parameter with an empty value.
How can I achieve this with characteristics and variants?
I have tried to set a default variant with an empty stock, but this makes the order button disappear with an out of stock display (initially).
Please Log in or Create an account to join the conversation.
If you set the price of these variants to zero and change the setting Display 'add to cart' button for free products to 'NO' the user will have to change the selection before they can add it to the cart.
regards
Trevor
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Also in your solution the add-to-cart button is not showing, so it is basically the same solution as the dummy value with a stock of zero.
There should be a simple way of achieving this, I guess?
Please Log in or Create an account to join the conversation.
Trevor
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Next to that a quick test gave me some more display issues that I will have to find soltions for, so this workaround is not workable for me, I'm sorrry.
Please Log in or Create an account to join the conversation.
That's how it's supposed to be though. If you want, you can add a custom text in one of the view files to notify the customer that he must first select a characteristic value. You could even have it display as an add to cart button and hide it when another variant is selected with a bit of javascript.
Otherwise, an alternative is to change the "characteristic selection method" setting of the HikaShop configuration to "list" in order to display the variants differently on the product page and avoid the issue altogether.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Going back, maybe I'm choosing the wrong approach. Take the example of my shoe-sizes. That's a pretty standard thing to set up as variants, right? Without hacks, I would be forced to set up a default shoe-size, right? But there is not a shoe-shop in the world that forces a default size: having to select a size is standard behaviour (for a color-choice that would be no problem).
Isn't there another way to achieve this in Hikashop? I am not a coder, so custom Javascript ot PHP is not for me...
Please Log in or Create an account to join the conversation.
I don't want to have to worry each time an order comes if the customer choose the correct item or not
There is a site that I visited where the quantity box is greyed out until you select a size then the quantity becomes available and you can add to cart. If you click on "Add to Cart" before clicking on a size it prompts you to choose a size. This would be very helpful because it forces the customer to click on a size before proceeding.
See screenshot.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
workscene.com.au/fxd-wp-4-cuffed-stretch-pant.html
www.lacestamagica.com/boutique-del-bebe/...a-bebe/dou-dou-osito
Apparently they seem to be able to accomplish it. Can you guide me in a direction so that I can achieve this too?
Please Log in or Create an account to join the conversation.
I totally agree with @MyWorld and @simonkloostra, and would like add our word here too. So maybe devs would be kind and could take a look into this faster....
Another issue with variants selection as hikashop have it now is waitlist notification:
www.hikashop.com/forum/product-category-...ts-and-waitlist.html
So changes are really welcome and should be done as soon as possible.
Kind Regards
Please Log in or Create an account to join the conversation.
Thank you for you feedback.
As I said:
That's all that is possible with the current version of HikaShop.If you want, you can add a custom text in one of the view files to notify the customer that he must first select a characteristic value. You could even have it display as an add to cart button and hide it when another variant is selected with a bit of javascript.
The "list" display that I also proposed in my previous message was already a first solution to be able to circumvent the problem that we added last year.
Now for a solution where the add to cart button would stay and display an error when clicking on it, that's something we could add in the futuren, yes.
Thank you for your feedback.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Any idea how fast you would be able to incorporate this? I can imagine it's hard to tell, but I must make a decision soon whether to wait for this or work on an alternative solution.
Please Log in or Create an account to join the conversation.
This option should be available, no matter what characteristics selection method we choose - no? I think this is a reasonable request and a valuable addition to HikaShop.
Thanks
Please Log in or Create an account to join the conversation.
That's difficult to say. I'm not sure how it should be implemented as there are many different cases for the display or not of add to cart buttons (because there is no stock, because the product is not sold anymore, because the variant doesn't exist, because the variant is unpublished, etc). So there are cases where you don't want the button and cases where you might want it, plus it needs to be backward compatible and not change the behavior for other cases when people update.
While it's not difficult to do as a customization in a special case for a developer, make it work properly in all the cases is a bit harder and needs to be done carefully, with a lot of testing.
So I can't say when it would happen because it probably won't be in the next version and can't say anything yet for versions after that.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
But maybe that's too simple, so I leave it up to you guys.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Thank you for your feedback !
Best regards,
Mohamed Thelji.
Please Log in or Create an account to join the conversation.
Would it be possible to add stock count attribute to variant input method? So it would like this:
Stock attribute should show selected variant stock amount. This would allow to add simple js on load to select next variant which has stock.
Kind Regards
Please Log in or Create an account to join the conversation.
I'm sorry but I don't understand what you want to do.
You can't add parameters like that in HTML content. There are rules and specifications (RFC) for HTML.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Sorry, maybe i wasn't clear enough. I also tried to highlight attribute in code tag those it added this "b" tags....
I suggest to add stock attribute by default to hikashop for variant inputs. This would allow to add js if condition based on stock.
I think this little improvement for variant selection would allow some more modifications....
I have attached screenshot. I hope you see my point.
Kind Regards
Please Log in or Create an account to join the conversation.
Yes ; it does not change what I was telling you in my message.
You can't add a "stock" attribute ; it's not compatible with the RFC !
At least, you can see to have a "data" attribute like we're doing for the add to cart buttons ; so something like " data-stock ".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.