- Posts: 117
- Thank you received: 0
style for product page
I hhave madea style for the product individual page. However I styled a form tag and it has affected all my form areas (I did realise it would) So, I guess I need to make a new style for the product page rather than the form. However I am not sure what element to style? would I create a class called .form?
Thanks for your help.
Sarah
Please Log in or Create an account to join the conversation.
.hikashop_product_form{
background-color: #FFFFFF !important;
}
Please Log in or Create an account to join the conversation.
.hikashop_product_form{
background: none repeat scroll 0 0 #EEEEEE;
border-radius: 5px 5px 5px 5px;
margin: 0;
padding-bottom: 20px;
padding-left: 25px;
}
It does not seem to be adding a style to the product form. It is still taking its style from the form
form {
background: none repeat scroll 0 0 #EEEEEE;
border-radius: 5px 5px 5px 5px;
margin: 0;
padding-bottom: 20px;
}
Please can you advise?
Please Log in or Create an account to join the conversation.
You should add a !important on each definition to force the override to your definition:
.hikashop_product_form{
background: none repeat scroll 0 0 #EEEEEE !important;
border-radius: 5px 5px 5px 5px !important;
margin: 0 !important;
padding-bottom: 20px !important;
padding-left: 25px !important;
}
Please Log in or Create an account to join the conversation.
.hikashop_product_top_part{
background: none repeat scroll 0 0 #EEEEEE;
border-left: 1px solid #BBBBBB;
border-radius: 5px 5px 0 0;
border-right: 1px solid #BBBBBB;
border-top: 1px solid #BBBBBB;
padding-left: 25px;
width: 98%;}
.hikashop_product_left_part{
text-align:center;
float:left;
width:50%;
}
.hikashop_product_right_part{
background: none repeat scroll 0 0 #EEEEEE;
border-right: 1px solid #BBBBBB;
float: left;
padding-left: 25px;
}
.hikashop_product_bottom_part{
clear: both;
background: none repeat scroll 0 0 #EEEEEE;
border-bottom: 1px solid #BBBBBB;
border-left: 1px solid #BBBBBB;
border-radius: 0 0 5px 5px;
border-right: 1px solid #BBBBBB;
padding-bottom: 20px;
padding-right: 10px;
width: 100%;}
However, I am unable to ge the left and right elements to fit in with this style. Do I have to created a new div or subcontaner which all of these elements sit inside? I am not sure if I would do this. Is there a better way?
Thanks so much, I could not do this alone! My friend who I am doing the site for is here this morning, and I hope we can upgrade our version today.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It's not a class by a name in the HTML so it can't be applied. You need to edit the file show of the view product via the menu Display->Views and add the code class="hikashop_product_form" after the code name="hikashop_product_form"
Please Log in or Create an account to join the conversation.
I am looking at display> views, and there are lots of different files, but I do not see one that has hikashop_product_form
Please can you tell me which file. I have looked at some of the checkout files and also some of the product files.
I may need to send you a screen shot when I know where it is as I am a little daunted by php files and want to be sure I do not mess them up!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I have found the file
checkout / step.php which is pasted below. I cannot find hikashop_product_form
I will be upgrading soon, I tried to yesterday, but I need my clients VAT number to add to the form.
Many thanks
Sarah
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.2
* @author hikashop.com
* @copyright (C) 2010-2011 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_checkout_page" class="hikashop_checkout_page">
<?php
if(hikashop_level(1)){
$open_hour = $this->config->get('store_open_hour',0);
$close_hour = $this->config->get('store_close_hour',0);
$open_minute = $this->config->get('store_open_minute',0);
$close_minute = $this->config->get('store_close_minute',0);
if($open_hour!=$close_hour || $open_minute!=$close_minute){
function getCurrentDate($format = '%H'){
if(version_compare(JVERSION,'1.6.0','>=')) $format = str_replace(array('%H','%M'),array('H','i'),$format);
return (int)JHTML::_('date',time()- date('Z'),$format,null);
}
$current_hour = getCurrentDate('%H');
$current_minute = getCurrentDate('%M');
$closed=false;
if($open_hour<$close_hour || ($open_hour==$close_hour && $open_minute<$close_minute)){
if($current_hour<$open_hour || ($current_hour==$open_hour && $current_minute<$open_minute)){
$closed=true;
}
if($close_hour<$current_hour || ($current_hour==$close_hour && $close_minute<$current_minute)){
$closed=true;
}
}else{
$closed=true;
if($current_hour<$close_hour || ($current_hour==$close_hour && $current_minute<$close_minute)){
$closed=false;
}
if($open_hour<$current_hour || ($current_hour==$open_hour && $open_minute<$current_minute)){
$closed=false;
}
}
if($closed){
$app=& JFactory::getApplication();
$app->enqueueMessage(JText::sprintf('THE_STORE_IS_ONLY_OPEN_FROM_X_TO_X',$open_hour.':'.sprintf('%02d', $open_minute),$close_hour.':'.sprintf('%02d', $close_minute)));
echo '</div>';
return;
}
}
}
global $Itemid;
$checkout_itemid = $this->config->get('checkout_itemid');
if(!empty($checkout_itemid )){
$Itemid = $checkout_itemid ;
}
$url_itemid='';
if(!empty($Itemid)){
$url_itemid='&Itemid='.$Itemid;
}
if($this->display_checkout_bar){
?>
<div id="hikashop_cart_bar" class="hikashop_cart_bar">
<?php
$already=true;
if (count($this->steps) > $this->step+1) $link=true;
foreach($this->steps as $k => $step){
$step=explode('_',trim($step));
$step_name = reset($step);
if($this->display_checkout_bar==2 && $step_name=='end'){
continue;
}
$class = '';
if($k==$this->step){
$already=false;
$class .= ' hikashop_cart_step_current';
}
if($already){
$class .= ' hikashop_cart_step_finished';
}
?> <div class="hikashop_cart_step<?php echo $class;?>">
<span>
<?php if($k==$this->step || empty($link)){ ?>
<?php echo JText::_('HIKASHOP_CHECKOUT_'.strtoupper($step_name));?>
<?php }else{ ?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.$k.$url_itemid);?>">
<?php echo JText::_('HIKASHOP_CHECKOUT_'.strtoupper($step_name));?>
</a>
<?php } ?>
</span>
</div><?php
}
?>
</div>
<?php
}
if(empty($this->noform)){
?>
<form action="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step+1).$url_itemid); ?>" method="post" name="hikashop_checkout_form" enctype="multipart/form-data">
<?php
}
$this->nextButton = true;
foreach($this->layouts as $layout){
$layout=trim($layout);
if($layout=='end'){
$this->continueShopping='';
}
$this->setLayout($layout);
echo $this->loadTemplate();
}
if(empty($this->noform)){
?>
<input type="hidden" name="Itemid" value="<?php echo $Itemid; ?>"/>
<input type="hidden" name="option" value="com_hikashop"/>
<input type="hidden" name="ctrl" value="checkout"/>
<input type="hidden" name="task" value="step"/>
<input type="hidden" name="previous" value="<?php echo $this->step; ?>"/>
<input type="hidden" name="step" value="<?php echo $this->step+1; ?>"/>
<?php echo JHTML::_( 'form.token' ); ?>
<br style="clear:both"/>
<?php
if($this->nextButton){
echo $this->cart->displayButton(JText::_('HIKA_NEXT'),'next',$this->params,hikashop_completeLink('checkout&task=step&step='.$this->step+1),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\'))document.forms[\'hikashop_checkout_form\'].submit(); return false;','id="hikashop_checkout_next_button"');
}
?>
</form>
<?php
if($this->continueShopping){
if(strpos($this->continueShopping,'Itemid')===false){
if(strpos($this->continueShopping,'index.php?')!==false){
$this->continueShopping.=$url_itemid;
}
}
if(!preg_match('#^https?
/#',$this->continueShopping)) $this->continueShopping = JURI::base().ltrim($this->continueShopping,'/');echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($this->continueShopping),'window.location=\''.JRoute::_($this->continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
}
}
?>
</div>
<div class="clear_both"></div>
<?php
if(JRequest::getWord('tmpl','')=='component'){
exit;
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.