- Posts: 59
- Thank you received: 0
Characteristics selection method Radio button
11 years 5 months ago #200440
by simonev
Characteristics selection method Radio button was created by simonev
-- HikaShop version -- : 4.2
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.2
Hi,
I can't find a way to edit this piece of code in product page, section characteristic (those are t-shirt sizes).
Specifically I need to change the render code order for "input" and "label" tags.
Now code is like this:
I need to have render code like this:
Do you have any suggestion about where to do it?
I found almost it in characteristic.php but don't really know if is the right file to do what I need.
Thanks for all your help
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.2
Hi,
I can't find a way to edit this piece of code in product page, section characteristic (those are t-shirt sizes).
Code:
<table class="hikashop_product_characteristics_table"><tbody><tr><td>Taglia</td><td><div class="controls">
<label for="hikashop_product_characteristic_13" id="hikashop_product_characteristic_13-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_13" value="3" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">XS
</label>
<label for="hikashop_product_characteristic_12" id="hikashop_product_characteristic_12-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_12" value="2" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">S
</label>
<label for="hikashop_product_characteristic_14" id="hikashop_product_characteristic_14-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_14" value="4" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">M
</label>
<label for="hikashop_product_characteristic_15" id="hikashop_product_characteristic_15-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_15" value="5" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">L
</label>
<label for="hikashop_product_characteristic_16" id="hikashop_product_characteristic_16-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_16" value="6" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">XL
</label>
</div>
</td></tr></tbody></table>
Specifically I need to change the render code order for "input" and "label" tags.
Now code is like this:
Code:
<label for="hikashop_product_characteristic_15" id="hikashop_product_characteristic_15-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_15" value="5" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);">L
</label>
I need to have render code like this:
Code:
<input type="radio" name="hikashop_product_characteristic[1]" id="hikashop_product_characteristic_15" value="5" class="inputbox myclass" size="1" onclick="return hikashopUpdateVariant(this);">
<label for="hikashop_product_characteristic_15 myclass" id="hikashop_product_characteristic_15-lbl" class="radio">
L</label>
Do you have any suggestion about where to do it?
I found almost it in characteristic.php but don't really know if is the right file to do what I need.
Thanks for all your help
Please Log in or Create an account to join the conversation.
11 years 5 months ago #200480
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Characteristics selection method Radio button
Hi,
See: www.hikashop.com/forum/product-category-...hikashop-please.html
Regards,
PS : I think you wanted to write HikaShop 2.4 ; and not HikaShop 4.2 (which does not exist yet)
See: www.hikashop.com/forum/product-category-...hikashop-please.html
Regards,
PS : I think you wanted to write HikaShop 2.4 ; and not HikaShop 4.2 (which does not exist yet)
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #200502
by nicolas
Replied by nicolas on topic Characteristics selection method Radio button
Hi,
It's not HikaShop which displays these pieces of HTML, it's actually Joomla.
In the file administrator/components/com_hikashop/types/characteristic.php you can see this line:
That's the line which calls joomla for the display of these radios.
If you wanted to change there display, you would have to modify the core files of Joomla doing the display of radios everywhere on your website.
It's not HikaShop which displays these pieces of HTML, it's actually Joomla.
In the file administrator/components/com_hikashop/types/characteristic.php you can see this line:
Code:
$html = JHTML::_('select.'.$characteristic_display.'list', $this->values, $map, 'class="inputbox" size="1"' . $this->options, 'value', 'text', (int)$value,$id );
If you wanted to change there display, you would have to modify the core files of Joomla doing the display of radios everywhere on your website.
The following user(s) said Thank You: simonev
Please Log in or Create an account to join the conversation.
11 years 5 months ago #200576
by simonev
Replied by simonev on topic Characteristics selection method Radio button
Thanks for your answer, I made some css tricks to do what I wanted so I didn't change joomla core files.
Please Log in or Create an account to join the conversation.
Time to create page: 0.248 seconds