Default value for variants
8 years 11 months ago #280140
by kyratn
Replied by kyratn on topic Default value for variants
Hi,
Its not about name of the attribute. You can name it as you need. Data-stock, data-quantity....
Its about having some quantity attribute for every variant. This would allow if condition....and its just 1 line of code in ../types/characteristic.php file.
We have modifies for our own needs but as this is core file we dont want to change it after every update...
Would this add some negative to hikashop? For sure NO.
Would this improve hikashop variant selection and allow people to have more modications? Fore sure YES. ( If you are not willing to redo variants in near future ).
So can hikashop add this?
I have seen many sites who use quantity attribute and could add links here if need it.
Thanks
Its not about name of the attribute. You can name it as you need. Data-stock, data-quantity....
Its about having some quantity attribute for every variant. This would allow if condition....and its just 1 line of code in ../types/characteristic.php file.
We have modifies for our own needs but as this is core file we dont want to change it after every update...
Would this add some negative to hikashop? For sure NO.
Would this improve hikashop variant selection and allow people to have more modications? Fore sure YES. ( If you are not willing to redo variants in near future ).
So can hikashop add this?
I have seen many sites who use quantity attribute and could add links here if need it.
Thanks
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280158
by nicolas
Replied by nicolas on topic Default value for variants
Hi,
With data-stock it's a good idea yes. It's just that "stock" is not a valid HTML attribute so we can't add "stock".
So what line do you suggest we add in there exactly ?
With data-stock it's a good idea yes. It's just that "stock" is not a valid HTML attribute so we can't add "stock".
So what line do you suggest we add in there exactly ?
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280204
by kyratn
Replied by kyratn on topic Default value for variants
Hi,
Its your choice Nicolas how you want to call it. You have better knowledge in everyway. If you think "data-stock" is fine then please add it.
Will this be added to next hikashop release or just as new build which we could download asap?
As for us this little improvement will allow to add some js and resolve our issue with waitlist notifications...
Thanks for looking into this.
Have a great day
Its your choice Nicolas how you want to call it. You have better knowledge in everyway. If you think "data-stock" is fine then please add it.
Will this be added to next hikashop release or just as new build which we could download asap?
As for us this little improvement will allow to add some js and resolve our issue with waitlist notifications...
Thanks for looking into this.
Have a great day
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280205
by kyratn
Replied by kyratn on topic Default value for variants
For characteristics selection method > table just need to add on line 155 inside input:
However for radio button this doesnt work on line 278
It looks like this is in another public function display and you need to call it again in foreach loop i guess. I am not sure how this should be correctly handled so i will wait for replay.
Kind Regards
Code:
data-stock=\"".$variant->product_quantity."\"
However for radio button this doesnt work on line 278
It looks like this is in another public function display and you need to call it again in foreach loop i guess. I am not sure how this should be correctly handled so i will wait for replay.
Kind Regards
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280253
by nicolas
Replied by nicolas on topic Default value for variants
Hi,
We'll add that to the next version.
We'll add that to the next version.
The following user(s) said Thank You: kyratn
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280256
by kyratn
Replied by kyratn on topic Default value for variants
Hi,
Great to hear it. Thank for looking into this.
Have a great day
Great to hear it. Thank for looking into this.
Have a great day
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280863
by kyratn
Replied by kyratn on topic Default value for variants
Hi,
With hikashop 3.2.1 I see you have added data-stock attribute but it is missing for radio buttons?
Kind Regards
With hikashop 3.2.1 I see you have added data-stock attribute but it is missing for radio buttons?
Kind Regards
Please Log in or Create an account to join the conversation.
8 years 11 months ago #280864
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Default value for variants
Hello,
HikaShop is using the Joomla core to display the dropdown or the radio list.
The API do not allow us to add extra data for the radio items ; there is a variable $attribs but it's global for all elements and the "option.attr" that you can find for "option()" is not processed in radiolist.
CF : github.com/joomla/joomla-cms/blob/stagin...html/select.php#L765
Regards,
HikaShop is using the Joomla core to display the dropdown or the radio list.
The API do not allow us to add extra data for the radio items ; there is a variable $attribs but it's global for all elements and the "option.attr" that you can find for "option()" is not processed in radiolist.
CF : github.com/joomla/joomla-cms/blob/stagin...html/select.php#L765
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.217 seconds