Characteristics display
I am looking to customize my product page as per this docs and same would apply for size selection. :
www.hikashop.com/support/documentation/2...isplay-by-color.html
So question. Would it be possible to apply this only for product page and keep words in module filtering?
We have 2 characteristics. One is for size and other for color. As we create product for every color there is no need to display color characteristic on product page. Is there a way to hide it? I have looked into css but it looks like there is no class applied...
Thanks
Please Log in or Create an account to join the conversation.
If i use dropdown selection of characterictics in product page and default variant is sold system will remove that selection and shows next possible variant. That's ok
However if i use radio button system will show that item is sold out and non of the possible variants is selected.
Tried with protostar template and it was same...
How can this be fixed?
Thanks
Please Log in or Create an account to join the conversation.
I'm sorry but I don't understand your problem. Could you provide a screenshot of the problem ?
Could you also provide a link to the product page and a screenshot of its settings and its variants listing ?
Please Log in or Create an account to join the conversation.
Sorry, maybe I was not clear enough.
So the issue is that if product has variants like sizes S, M, L, XL and default variant is set to S as example, and If this variant is sold out and you come to product page you will see that product is soldout. This is happening if Characteristics selection method is set to radio buttons. All works fine with dropdown selection. I think system should select next possible variant automatically but it does not....
You can check this link: kyra.lt/demoadmin/tampres/leginsai-pinky-pilka
Default product variant is S which has quantity of 0 and you get Sold out message until you choose one of the possible variants.
This is misleading for buyer experiences and to work for it as it should I would have to set another variant as default if default variants would be sold out manually for every product...
I have attached screenshots to be more clear and I hope you understand what is the issue.
Thanks
Please Log in or Create an account to join the conversation.
Ok. I see what you mean now.
Then please try replacing the code:
Please Log in or Create an account to join the conversation.
I would be happy to try it but which of the files I should modify?
I have done quick search and couldn't find. I assume its not in one of the view files..
Thanks
Please Log in or Create an account to join the conversation.
Sorry for that. It's in the file administrator/components/com_hikashop/types/characteristic.php
Please Log in or Create an account to join the conversation.
So i have tried to replace code and nothing has changed
Still wont select next variant using radio buttons
Any other solution?
Thanks
Please Log in or Create an account to join the conversation.
Then, instead of that code, please try that code:
Please Log in or Create an account to join the conversation.
Unfortunately it didn't work!
I may be wrong but this your code looks for me same as in your previous post??
Thanks
Please Log in or Create an account to join the conversation.
You're right, I've pasted the wrong code...
Here is the new code to try:
Please Log in or Create an account to join the conversation.
I can confirm that you code is working, thank you for looking into this.
However I have another few questions.
1. To modify the look of the radio buttons I have added span classes to characteristics like that:
and added such css to my template:
Is there a way to hide html classes from dropdown? In admin panel product->variant-> main options->in dropdown selection it shows:
but I would like to have just "S". Just for more user friendly when changing it. Same applies for front-end dropdown selection if need it.....
Screenshot attached to be more clear.
2. We use 2 characteristics. SIZE and COLOR. As for every color we create new product we would like to hide Color characteristic display from product page and display only Size. How can I hide it or How can I apply different css for different characteristics?
Thank you
Please Log in or Create an account to join the conversation.
1. Edit the file administrator/components/com_hikashop/types/characteristic.php and change the line:
2. In the same file, change the line:
$main_html.='<tr>';
to:
$main_html.='<tr class="hikashop_characteristic_line_'.$characteristic->characteristic_id.'">';
that way, each characteristic line will have its own class for your CSS code.
Please Log in or Create an account to join the conversation.
Just last question. Will this be added by default to hikashop or i should save these changes?
Thank you
Please Log in or Create an account to join the conversation.
Yes, it will be.
Please Log in or Create an account to join the conversation.
Thats's great but I just added few products and found few more small issues. Everything works fine but if this could be updated then it would be good.
1. In product->add variants->and select characteristic. For faster search i enter first letter of my characteristic and it find it asap, just need to press save.
However if search for "S" it will find span class...same applies to other letters from "span class". I have attached screenshot with name "variants1" So you should understand what mean.
2. If default product variant is unpublished span class isnt applied. I guess its because of input checked use. If published all is fine.
Should i look into my css or it is more related to your code? I have attached 2 more screenshots to be more clear.
The code to give color for checked variant i use is this:
Thank you
Please Log in or Create an account to join the conversation.
1. The search is done in MySQL and there is no function in MySQL to be able to remove HTML tags in strings (that has to be done in PHP). So that's unfortunately not possible as doing the search in PHP is not possible either for performance issues.
2. You're not supposed to select a default variant that you don't enable.
It's like trying to add to cart a product that is unpublished. That shouldn't happen.
So I don't see why you're trying to do that ?
Please Log in or Create an account to join the conversation.
1. I see. thanks for clarification.
2. I understand what you mean. I don't try to select default variant...The problem is that if default variant is unpublished, the next possible variant has no checked="checked" inside input and my span class with color isn't applied because of this.
That's not a big deal. I keep product published until all variants are sold. I just found this small issue and tho I will share or something
Thanks
Please Log in or Create an account to join the conversation.
So I just found another issue and have no idea how to fix it.
If product is sold out and characteristics display method is set to radio buttons I get js error and all js on that product page isn't working.
Uncaught TypeError: Cannot set property 'checked' of null(anonymous function)
@ golfas-dragon-melyna:572i
@ jquery.min.js:2fireWith
@ jquery.min.js:2ready
@ jquery.min.js:2K
@ jquery.min.js:2
I tried with default file with no modifications and it was same. How could I fix it?
Thanks
Please Log in or Create an account to join the conversation.
Can you provide a link to a product page with that issue please ?
Please Log in or Create an account to join the conversation.