- Posts: 79
- Thank you received: 0
Modifying product > show file
- PhantomPWR
-
Topic Author
- Offline
Less
More
15 years 3 months ago #18303
by PhantomPWR
Modifying product > show file was created by PhantomPWR
Hi there,
I have a product page with characteristics and custom items. The characteristics display first and then the custom items. I would like to swap them around so the custom items are at the top.
I had a look at the product > show file, but I don't know enough about PHP to cut the correct bit of code and paste it above the characteristics.
I tried, but get syntax errors because a '}' ends up in the wrong place when I modify the code.
Thanks
I have a product page with characteristics and custom items. The characteristics display first and then the custom items. I would like to swap them around so the custom items are at the top.
I had a look at the product > show file, but I don't know enough about PHP to cut the correct bit of code and paste it above the characteristics.
I tried, but get syntax errors because a '}' ends up in the wrong place when I modify the code.
Thanks
Please Log in or Create an account to join the conversation.
15 years 3 months ago #18310
by nicolas
Replied by nicolas on topic Re: Modifying product > show file
The characteristics are displayed by the code:
if(!empty($this->element->characteristics)){
?><span id="hikashop_product_characteristics" class="hikashop_product_characteristics"><?php
echo $this->characteristic->displayFE($this->element,$this->params);
?></span><br /><?php
}
You can cut&paste that code just before the code:
?>
<span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main">
if you want to have it after the custom fields.
if(!empty($this->element->characteristics)){
?><span id="hikashop_product_characteristics" class="hikashop_product_characteristics"><?php
echo $this->characteristic->displayFE($this->element,$this->params);
?></span><br /><?php
}
You can cut&paste that code just before the code:
?>
<span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main">
if you want to have it after the custom fields.
Please Log in or Create an account to join the conversation.
- PhantomPWR
-
Topic Author
- Offline
Less
More
- Posts: 79
- Thank you received: 0
15 years 3 months ago #18313
by PhantomPWR
Replied by PhantomPWR on topic Re: Modifying product > show file
Brilliant!
Thanks Nicolas
Thanks Nicolas
Please Log in or Create an account to join the conversation.
11 years 4 months ago #200916
by rturan
Replied by rturan on topic Modifying product > show file
hi can you help me to find the php file of
"<div id="hikashop_product_characteristics" class="hikashop_product_characteristics"><table class="hikashop_product_characteristics_table"><tr><td>COLORS</td><td><div class="controls">
<label for="hikashop_product_characteristic_1110" id="hikashop_product_characteristic_1110-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[11]" id="hikashop_product_characteristic_1110" value="10" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" ><span class="color-name">Orchid Purple</span><img onclick="return hikashopUpdateVariant('hikashop_product_characteristic_1110');" src=" thequirkshop.com/moleskine/images/color-icons/color2.jpg " />
</label>
<label for="hikashop_product_characteristic_1119" id="hikashop_product_characteristic_1119-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[11]" id="hikashop_product_characteristic_1119" value="19" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" ><span class="color-name">Black</span><img onclick="return hikashopUpdateVariant('hikashop_product_characteristic_1119');" src=" thequirkshop.com/moleskine/images/color-icons/black.jpg " />
</label>
</div>
</td></tr><tr><td>COVER</td><td><div class="controls">
<label for="hikashop_product_characteristic_1514" id="hikashop_product_characteristic_1514-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[15]" id="hikashop_product_characteristic_1514" value="14" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >HARD
</label>
<label for="hikashop_product_characteristic_1526" id="hikashop_product_characteristic_1526-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[15]" id="hikashop_product_characteristic_1526" value="26" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >SOFT
</label>
</div>
</td></tr><tr><td>FORMAT</td><td><div class="controls">
<label for="hikashop_product_characteristic_1321" id="hikashop_product_characteristic_1321-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[13]" id="hikashop_product_characteristic_1321" value="21" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >LARGE (5 x 8 ¼)
</label>
<label for="hikashop_product_characteristic_1323" id="hikashop_product_characteristic_1323-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[13]" id="hikashop_product_characteristic_1323" value="23" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >A4 (8 ¼ x 11 ¾)
</label>
</div>
</td></tr><tr><td>LAYOUT</td><td><div class="controls">
<label for="hikashop_product_characteristic_1724" id="hikashop_product_characteristic_1724-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[17]" id="hikashop_product_characteristic_1724" value="24" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >RULED
</label>
<label for="hikashop_product_characteristic_1725" id="hikashop_product_characteristic_1725-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[17]" id="hikashop_product_characteristic_1725" value="25" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >DOTTED
</label>
</div>
</td></tr></table>"
I cant see in the administrator/components/com_hikashop/type/characteristic.php ..
I want to add <span> to text after <input radio>
"<div id="hikashop_product_characteristics" class="hikashop_product_characteristics"><table class="hikashop_product_characteristics_table"><tr><td>COLORS</td><td><div class="controls">
<label for="hikashop_product_characteristic_1110" id="hikashop_product_characteristic_1110-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[11]" id="hikashop_product_characteristic_1110" value="10" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" ><span class="color-name">Orchid Purple</span><img onclick="return hikashopUpdateVariant('hikashop_product_characteristic_1110');" src=" thequirkshop.com/moleskine/images/color-icons/color2.jpg " />
</label>
<label for="hikashop_product_characteristic_1119" id="hikashop_product_characteristic_1119-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[11]" id="hikashop_product_characteristic_1119" value="19" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" ><span class="color-name">Black</span><img onclick="return hikashopUpdateVariant('hikashop_product_characteristic_1119');" src=" thequirkshop.com/moleskine/images/color-icons/black.jpg " />
</label>
</div>
</td></tr><tr><td>COVER</td><td><div class="controls">
<label for="hikashop_product_characteristic_1514" id="hikashop_product_characteristic_1514-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[15]" id="hikashop_product_characteristic_1514" value="14" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >HARD
</label>
<label for="hikashop_product_characteristic_1526" id="hikashop_product_characteristic_1526-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[15]" id="hikashop_product_characteristic_1526" value="26" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >SOFT
</label>
</div>
</td></tr><tr><td>FORMAT</td><td><div class="controls">
<label for="hikashop_product_characteristic_1321" id="hikashop_product_characteristic_1321-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[13]" id="hikashop_product_characteristic_1321" value="21" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >LARGE (5 x 8 ¼)
</label>
<label for="hikashop_product_characteristic_1323" id="hikashop_product_characteristic_1323-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[13]" id="hikashop_product_characteristic_1323" value="23" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >A4 (8 ¼ x 11 ¾)
</label>
</div>
</td></tr><tr><td>LAYOUT</td><td><div class="controls">
<label for="hikashop_product_characteristic_1724" id="hikashop_product_characteristic_1724-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[17]" id="hikashop_product_characteristic_1724" value="24" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >RULED
</label>
<label for="hikashop_product_characteristic_1725" id="hikashop_product_characteristic_1725-lbl" class="radio">
<input type="radio" name="hikashop_product_characteristic[17]" id="hikashop_product_characteristic_1725" value="25" checked="checked" class="inputbox" size="1" onclick="return hikashopUpdateVariant(this);" >DOTTED
</label>
</div>
</td></tr></table>"
I cant see in the administrator/components/com_hikashop/type/characteristic.php ..
I want to add <span> to text after <input radio>
Please Log in or Create an account to join the conversation.
11 years 4 months ago #200917
by rturan
Replied by rturan on topic Re: Modifying product > show file
administrator/components/com_hikashop/type/characteristic.php
can you help me.. how i will locate the <label> in the characteristic.php
can you help me.. how i will locate the <label> in the characteristic.php
Please Log in or Create an account to join the conversation.
11 years 4 months ago #200924
by Xavier
Replied by Xavier on topic Re: Modifying product > show file
Hi,
To generate the content we give parameters to the Joomla function:
In the "display()" function of that file.
So what do you exactly want to do ?
You can potentially replace the line:
to pass your custom html content in the $html var, or you can change the given informations to the current function.
To generate the content we give parameters to the Joomla function:
Code:
JHTML::_('select.'.$characteristic_display.'list', $this->values, $map, 'class="inputbox" size="1"' . $this->options, 'value', 'text', (int)$value,$id );
So what do you exactly want to do ?
You can potentially replace the line:
Code:
$html = JHTML::_('select.'.$characteristic_display.'list', $this->values, $map, 'class="inputbox" size="1"' . $this->options, 'value', 'text', (int)$value,$id );
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds