Address Information style change

  • Posts: 8
  • Thank you received: 0
10 years 9 months ago #168005

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.3
-- Browser(s) name and version -- : Chrome 36.0.1985.143
-- Error-message(debug-mod must be tuned on) -- : Modify registration form

Hi,
I am using hikashop starter and hikashop multivendor for one of my sites, the client want a modified look for the address information form, But I don't have a clue from where do I start. Need you guys help. I have also tried custom css from my template, but that didn't work too, as I see it is in an iframe. (need css style modification) Screenshot attached (attachment)

I also need Unit price to show in show_quantity.php, Please also advise how can I do that. I just need the price not the currency particularly in that place. like now it is MYR. 6 but need in this place only to show 6.
I have attached screenshot (S12) I want that exact output.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #168009

Hi,

1. You have to edit the css file of your template, as it's in a popup, the hikashop css is not loaded.
Here is some documentation about price

2. To remove the currency symbol you can edit the currencies via the menu System > Currencies, and put a space instead of the currency symbol.

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

  • Posts: 8
  • Thank you received: 0
10 years 9 months ago #168122

Hi,

I have fix the CSS problem. but the second question isn't solve.

check the attachment for details view



i want to show the price in the hikashop_product_quantity_main so i edit the show_quantity view as u can see from the attachment but i can't show the price in there. what i want to do is. show quantity X price = total price. how can i get the current products price as variable so that i can use jquery to calculate the total price in this part.

hope you understand.

Attachments:

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

  • Posts: 8
  • Thank you received: 0
10 years 9 months ago #168123

i also try to do is below code and it show me Free in price section.

<?php
/**
 * @package	HikaShop for Joomla!
 * @version	2.3.2
 * @author	hikashop.com
 * @copyright	(C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
$i =$this->params->get('i');
$min_quantity =$this->params->get('min_quantity');
$max_quantity =$this->params->get('max_quantity');
$html =$this->params->get('html');

$qLayout = JRequest::getVar('quantitylayout','show_default');
switch($qLayout){
	case 'show_regrouped':
		?>
		<div class="input-append hikashop_product_quantity_div hikashop_product_quantity_input_div_regrouped">
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
			<div class="add-on hikashop_product_quantity_div hikashop_product_quantity_change_div_regrouped">
				<div class="hikashop_product_quantity_change_div_plus_regrouped">
					<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
				</div>
				<div class="hikashop_product_quantity_change_div_plus_regrouped">
					<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">&ndash;</a>
				</div>
			</div>
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_regrouped">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_select':
		if($min_quantity == 0)
			$min_quantity = 1;
		if($max_quantity == 0)
			$max_quantity = (int)$min_quantity * 15;
		?>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_input_div_select">
			<select id="hikashop_product_quantity_select_<?php echo $i; ?>" onchange="var id = this.id.replace('select','field'); document.getElementById(id).value = this.value;">
				<?php
				for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
					echo '<option value="'.$j.'">'.$j.'</option>';
				}
				?>
			</select>
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="hidden" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_select">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_simple':
		?>
		<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="hidden" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" />
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_simple">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_leftright':
		?>
		<div class="input-prepend input-append hikashop_product_quantity_div hikashop_product_quantity_change_div_leftright">
			<span class="add-on">
				<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
			</span>
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
			<span class="add-on">
				<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">&ndash;</a>
			</span>
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_leftright">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_simplified':
		?>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_input_div_simplified">
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_simplified">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_default_div':
		?>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_input_div_default">
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_change_div_default">
			<div class="hikashop_product_quantity_change_div_plus_default">
				<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
			</div>
			<div class="hikashop_product_quantity_change_div_minus_default">
				<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">&ndash;</a>
			</div>
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_default">
			<?php echo $html; ?>
		</div>
		<?php
		break;
	case 'show_default':
		?>
		<table>
			<tr>
				<td rowspan="2">
					<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
				</td>
				<td>
					<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
				</td>
               <td rowspan="2">X</td>
              <td rowspan="2"><?php
  //$this->params->get('price_with_tax'));
  $this->setLayout('listing_price');
  echo $this->loadTemplate();
  	
                ?>
				</td> 
              <td rowspan="2"><?php
  				echo "="; ?>      
				</td> 
              <td rowspan="2"><?php
  				echo '<input type="text" id="total" vlaue="value">'; ?>
				</td> 
				<td rowspan="2">
					<?php echo $html; ?>
				</td>
			</tr>
			<tr>
				<td>
					<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">&ndash;</a>
				</td>
			</tr>
          <tr>
          <td>Cartoon</td>
          <td></td>
          <td></td>            
          <td></td>            
          </tr>
		</table>
		<?php
		break;
	default:
		if(substr($qLayout,0,14) == 'show_quantity_'){
			$doc = JFactory::getDocument();
			$app = JFactory::getApplication();
			$quantityDisplayType = hikashop_get('type.quantitydisplay');
			if($quantityDisplayType->check( $qLayout, $app->getTemplate())){
				$controller = new hikashopBridgeController(array('name'=>'product'));
				$viewType	= $doc->getType();
				if(!HIKASHOP_PHP5) {
					$view = & $controller->getView( '', $viewType, '');
				} else {
					$view = $controller->getView( '', $viewType, '');
				}
				$view->setLayout($qLayout);
				echo $view->loadTemplate();
				break;
			}
		}
		?>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_input_div_default">
			<input id="hikashop_product_quantity_field_<?php echo $i; ?>" type="text" value="<?php echo JRequest::getInt('quantity',$min_quantity); ?>" class="hikashop_product_quantity_field" name="quantity" onchange="hikashopCheckQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);" />
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_change_div_default">
			<div class="hikashop_product_quantity_change_div_plus_default">
				<a id="hikashop_product_quantity_field_change_plus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_plus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',1,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">+</a>
			</div>
			<div class="hikashop_product_quantity_change_div_minus_default">
				<a id="hikashop_product_quantity_field_change_minus_<?php echo $i; ?>" class="hikashop_product_quantity_field_change_minus hikashop_product_quantity_field_change" href="#" onclick="return hikashopQuantityChange('hikashop_product_quantity_field_<?php echo $i; ?>',0,<?php echo $max_quantity; ?>,<?php echo $min_quantity; ?>);">&ndash;</a>
			</div>
		</div>
		<div class="hikashop_product_quantity_div hikashop_product_quantity_add_to_cart_div hikashop_product_quantity_add_to_cart_div_default">
			<?php echo $html; ?>
		</div>
		<?php
		break;
}
?>

Last edit: 10 years 9 months ago by pappadesign.

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

  • Posts: 83905
  • Thank you received: 13581
  • MODERATOR
10 years 9 months ago #168133

You can't use the code:
$this->setLayout('listing_price');
echo $this->loadTemplate();
in that view file because the data of the product/price is not loaded in that view file.
You would have to manually load it from the database basing yourself on the product_id in the $_REQUEST variable, so it's not easy to do that.

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

  • Posts: 8
  • Thank you received: 0
10 years 9 months ago #168319

Hi Nic,

I was able to get this by the code below

$productClass = hikashop_get('class.product');
					$product = $productClass ->get($pid);
					$currencyClass = hikashop_get('class.currency');
					$products = array(&$product);
					$ids = array($pid);
					$config =& hikashop_config();
					$main_currency = $currency_id = (int)$config->get('main_currency',1);
					$zone_id = explode(',',$config->get('main_tax_zone',0));
					if(count($zone_id)){
					$zone_id = array_shift($zone_id);
					}else{
					$zone_id=0;
					}
					$discount_before_tax = (int)$config->get('discount_before_tax',0);
					$currencyClass->getPrices($products,$ids,hikashop_getCurrency(),$main_currency,$zone_id,$discount_before_tax);
					
					$pricex = $currencyClass->format($products[0]->prices[0]->price_value,$products[0]->prices[0]->price_currency_id) ;
					echo $pricex; 

now i can get the product unit price using "$currencyClass->format($products[0]->prices[0]->price_value,$products[0]->prices[0]->price_currency_id) ;"

i got it from your one of post from this link
www.hikashop.com/forum/2-general-talk-ab...-cart-modal-how.html

now i want to get the Characteristics price..... how can i do that?

Last edit: 10 years 9 months ago by pappadesign.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #168327

Hi,

The characteristics allow to have variants, the variants are stored as products in the product table, but with a parent id.
So to have the characteristic price, it is still based on the id, but the variant one.

You have to get the correct variant id and then get the price value of this variant.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum