Skip to main content

impact less css only on content module

More
10 years 11 months ago - 10 years 11 months ago #219101 by kaya
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.5

Hi dear
I created custom template and use less file. I add my less file in my template and want use only on hikashop module but
it's impact on hikashop product page menu. How can use it only on my module?
Last edit: 10 years 11 months ago by kaya.

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

More
10 years 11 months ago #219104 by Jerome
Hi,

Use less generic selectors to only focus on your module.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: kaya

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

More
10 years 11 months ago #219211 by kaya
Thank you dear Jerome
How can do it? has it sample code?

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

More
10 years 11 months ago #219231 by nicolas
For example, suppose that the main class of your module is hikashop_cart_module and that you want to change the color of the text of the prices (with the class hikashop_full_price, you can do it like that:
.hikashop_cart_module .hikashop_full_price{ color: red !important; }

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

More
10 years 11 months ago #219300 by kaya
Hi Dear Nicolas
I'm using jquery and use jquery on this class hikashop_products mycustomclass in views/products/tmpl/listing_div.php and use this class hikashop_products mycustomclass I want only use on mudule but it's impact on products menu page.
I added jquery on my custom template and use it with class hikashop_products mycustomclass in hikashop module.
how can use it only on module? it's very important for me. thank you.
part of listing_div.php
Code:
<div class="hikashop_products mycustomclass"> <?php if(!empty($this->rows)){ if ($this->config->get('show_quantity_field')>=2) { ?> <form action="<?php echo hikashop_completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $this->params->get('main_div_name'); ?>" enctype="multipart/form-data"> <?php } if($enableCarousel){ $this->setLayout('carousel'); echo $this->loadTemplate(); } else { $columns = (int)$this->params->get('columns'); if(empty($columns) || $columns<1) $columns = 1; $width = (int)(100/$columns)-1; $current_column = 1; $current_row = 1; if(HIKASHOP_RESPONSIVE) { switch($columns) { case 12: case 6: case 4: case 3: case 2: case 1: $row_fluid = 12; $span = $row_fluid / $columns; break; case 10: case 8: case 7: $row_fluid = $columns; $span = 1; break; case 5: $row_fluid = 10; $span = 2; break; case 9: // special case $row_fluid = 10; $span = 1; break; } $span = constant('HK_GRID_COL_'.$span); if($row_fluid == 12) echo '<div class="'.HK_GRID_ROW.'">'; else echo '<div class="row-fluid-'.$row_fluid.'">'; if(HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') echo '<ul class="'.HK_GRID_THUMBNAILS.'">'; } foreach($this->rows as $row){ if(!HIKASHOP_RESPONSIVE) { ?> <div class="ad-hikashop_product"> <div class="hikashop_container"> <div class="hikashop_subcontainer <?php echo $this->borderClass; ?>"> <?php } else { ?> <<?php echo (HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') ? 'li' : 'div'; ?> class="<?php echo $span; ?> hikashop_product hikashop_product_column_<?php echo $current_column; ?> hikashop_product_row_<?php echo $current_row; ?>"> <div class="hikashop_container"> <div class="hikashop_subcontainer <?php echo $this->borderClass; ?>"> <?php } if($row->product_parent_id != 0 && isset($row->main_product_quantity_layout)){ $row->product_quantity_layout = $row->main_product_quantity_layout; } if(!empty($row->product_quantity_layout) && $row->product_quantity_layout != 'inherit'){ $qLayout = $row->product_quantity_layout; }else{ $categoryQuantityLayout = ''; if(!empty($row->categories) ) { foreach($row->categories as $category) { if(!empty($category->category_quantity_layout) && $this->quantityDisplayType->check($category->category_quantity_layout, $app->getTemplate())) { $categoryQuantityLayout = $category->category_quantity_layout; break; } } } if(!empty($categoryQuantityLayout) && $categoryQuantityLayout != 'inherit'){ $qLayout = $categoryQuantityLayout; }else{ $qLayout = $this->config->get('product_quantity_display','show_default'); } } JRequest::setVar('quantitylayout',$qLayout); $this->row =& $row; $this->setLayout('listing_'.$this->params->get('div_item_layout_type')); echo $this->loadTemplate(); if(!HIKASHOP_RESPONSIVE) { ?> </div> </div> </div> <?php } else { ?> </div> </div> </<?php echo (HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') ? 'li' : 'div'; ?>> <?php } if($current_column>=$columns){ $current_row++; if(!HIKASHOP_RESPONSIVE) { ?> <?php } $current_column=0; } $current_column++; } if(HIKASHOP_RESPONSIVE) { if(HK_GRID_THUMBNAILS !== false && HK_GRID_THUMBNAILS != '') echo '</ul>'; echo '</div>'; } } ?> <?php if ($this->config->get('show_quantity_field')>=2) { $this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$this->params->get('main_div_name').'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$this->params->get('main_div_name').'\'); } return false;'; $this->row = new stdClass(); $this->row->prices = array($this->row); $this->row->product_quantity = -1; $this->row->product_min_per_order = 0; $this->row->product_max_per_order = -1; $this->row->product_sale_start = 0; $this->row->product_sale_end = 0; $this->row->prices = array('filler'); $this->params->set('show_quantity_field',2); $this->setLayout('quantity'); echo $this->loadTemplate(); if(!empty($this->ajax) && $this->config->get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?> <input type="hidden" name="popup" value="1"/> <?php } ?> <input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/> <input type="hidden" name="add" value="1"/> <input type="hidden" name="ctrl" value="product"/> <input type="hidden" name="task" value="updatecart"/> <input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url)));?>"/> </form> <?php } } ?> </div>

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

More
10 years 11 months ago #219413 by Jerome
Hi,

I'm sorry but our support team is not able to answer to that kind of CSS/JS customization question.
We have a documentation for the customization on HikaShop.
www.hikashop.com/support/support/documen...ize-the-display.html
Afterwards, I can only suggest you to find CSS tutorials on Internet.

All I can tell you is that the module have an ID and that's all which is required to perform good CSS rules on it.

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.236 seconds
Powered by Kunena Forum