Modifying product > show file

  • Posts: 79
  • Thank you received: 0
13 years 4 months ago #18303

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

Please Log in or Create an account to join the conversation.

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
13 years 4 months ago #18310

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.

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 0
13 years 4 months ago #18313

Brilliant!

Thanks Nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 5 months ago #200916

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>

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 5 months ago #200917

administrator/components/com_hikashop/type/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.

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #200924

Hi,

To generate the content we give parameters to the Joomla function:

JHTML::_('select.'.$characteristic_display.'list',   $this->values, $map, 'class="inputbox" size="1"' . $this->options, 'value', 'text', (int)$value,$id );
In the "display()" function of that file.

So what do you exactly want to do ?
You can potentially replace the line:
$html = JHTML::_('select.'.$characteristic_display.'list',   $this->values, $map, 'class="inputbox" size="1"' . $this->options, 'value', 'text', (int)$value,$id );
to pass your custom html content in the $html var, or you can change the given informations to the current function.

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum