Minimal quantity

  • Posts: 12
  • Thank you received: 0
9 years 1 month ago #240981

Hello,

I'd like to create a product available in different quantity and with different prices. I found the "Price" area and the "limitiation" area of the product but can't find how to set it correctly.

My product has to be available in pack of 500 , 750 or 1000 pieces and the price is different for each pack.

I set the prices in the price zone, it works fine.
For the quantity I set "Quantity per order" on "250" to "1000"
And the "Quantity input" on "Select"

The problem is that the result is a list with 250 , 500 , 750 and 1000.
I want 500, 750 and 1000.

Can you please help me?
Thanks.

Last edit: 9 years 3 weeks ago by raphaelr@alkaonline.be.

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

  • Posts: 84050
  • Thank you received: 13624
  • MODERATOR
9 years 1 month ago #241001

Hi,

You should configure 3 prices with the corresponding 'min qty'.
Then, set the "Quantity input" setting of the product to 'show select price' and the customers will only be able to select the quantity among these quantities.

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

  • Posts: 113
  • Thank you received: 18
9 years 1 month ago #241619

I had a similar need and was hoping this was a solution.
When I set this up for a product to limit purchases to specific quantities, the display doesn't look right, and the combo box presented for quantity doesn't include all quantities defined.
Attached are screen shots that present two issues:
1. The order of the quantities doesn't appear right. I would think these should be in order of: unit price, then quantity.
2. The combo box prompting for quantity doesn't appear properly ordered and is missing some define pricing options, e.g 2500, 5000, 10000


Also attached are portions of the product definition - pricing and restrictions.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #241673

Hi,

In your case, there is the same price for different quantities, so this is not correct.
If you remove the prices for "200" and "150" quantities all the problems will be solved.

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

  • Posts: 113
  • Thank you received: 18
9 years 1 month ago #241707

I'm not clear what is meant by "this is not correct".
From a selling perspective, the ability to specify increments and associated unit cost is a requirement.
For printed products (business cards, brochures, flyers) for example, the quantity references the size of a print run. The run sizes (quantity) may be limited by available packaging materials or any number of factors. And the unit price often is the same between quantity breaks.

Regardless, I modified the prices slightly and the order of display is by price from highest to lowest. Though cleaner, I would still maintain that ideally the order should account for both price and quantity.

Additionally, the values presented in the combo box when "SHOW_SELECT_PRICE" don't make sense to me. In the initial screen capture provided, it doesn't include all of the quantity breaks defined. At present, I'm only seeing three out of nine defined quantity breaks as seen in this screen capture.



The screen capture is from the product page, from the listing page the user can select any multiple of the minimum quantity. It appears the user can get around the quantity breaks by modifying the quantity in the cart. Perhaps there's something else I need to do for the "SHOW_SELECT_PRICE" to work from the listing page.

I did come up with a way to present specific quantity breaks and associated price using variants - but this isn't ideal. The quantity breaks (e.g. "Run Size") are characteristics applied to the base product, each variant has a minimum and maximum quantity associated that reflects the run size. This works well enough, though the quantity is displayed twice on the product page, once from the variant selection combo box and once in the quantity selected box.

In this scenario, maintenance is cumbersome as the order of variants appears to change during maintenance. The order is correct when the product is initially displayed. Clicking on the "Save" button on the right of the variant editing screen changes the order. Clicking the product Save button above the product restores the order.

Initial display of variants:


Display of variants after saving a variant


Perhaps I'm not understanding the intent or how to use "SHOW_SELECT_PRICE", or perhaps there's a better method to control / limit the quantity breaks a customer can select, and to specify the unit cost per quantity.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #241757

Hi,

For the quantity selector, please edit the view "product / show_quantity" and replace the line:

if(in_array($price->price_min_quantity,$pricesSet) || $price->price_min_quantity < $min_quantity  || $price->price_min_quantity > $max_quantity)
	continue;
By:
if(in_array($price->price_min_quantity,$pricesSet) || $price->price_min_quantity < $min_quantity)
	continue;

The following user(s) said Thank You: csymmonds

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

  • Posts: 12
  • Thank you received: 0
9 years 1 month ago #241803

Dear Thomas, thanks for your answer.
I set the product as you said but it's not the result i wanted...

Thanks for your help

Attachments:

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

  • Posts: 113
  • Thank you received: 18
9 years 1 month ago #241829

Rephaelr: If I understand your intent, change the "Quantity Input" in the "Display" section to:
"SHOW_SELECT_PRICE".

Yours is configured with "SHOW_SELECT" in the lower left of the first screen capture attachment.

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

  • Posts: 4820
  • Thank you received: 654
  • MODERATOR
9 years 1 month ago #241805

Hello,

Can you provide a backend configuration of your product price AND a screenshot of an product page example to see the results.

Awaiting news from you.

Regards.

Last edit: 9 years 1 month ago by Philip.

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

  • Posts: 12
  • Thank you received: 0
9 years 1 month ago #242127

csymmonds wrote: Rephaelr: If I understand your intent, change the "Quantity Input" in the "Display" section to:
"SHOW_SELECT_PRICE".

Yours is configured with "SHOW_SELECT" in the lower left of the first screen capture attachment.


Hello, thanks for the answer. I can't find SHOW_SELECT_PRICE in the list... :s


Philip wrote: Hello,

Can you provide a backend configuration of your product price AND a screenshot of an product page example to see the results.

Awaiting news from you.

Regards.

Thanks for your help.
Here is the two screenshots.




Attachments:
Last edit: 9 years 1 month ago by raphaelr@alkaonline.be.

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

  • Posts: 84050
  • Thank you received: 13624
  • MODERATOR
9 years 1 month ago #242128

Hi,

After the "show select" choice, you should have a show select price:
take.ms/Nk2xW
That's the one that needs to be used as I explained in the beginning.
Since you don't have it, It's possible that the problem is that you're using an old version of HikaShop.
Please make sure that you're using the latest version.

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

  • Posts: 12
  • Thank you received: 0
9 years 1 month ago #242242

OK i've upgraded Hkashop with the latest pack.
Now I see "SHOW_SELECT_PRICE" in the list. But I still have the same quantity field.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #242271

Hi,

Could you give us a backend access to your website and a link to the concerned product ?

You can send these informations through our contact form, don't forget to give the link of that topic in your message.
www.hikashop.com/support/contact-us.html

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

  • Posts: 12
  • Thank you received: 0
9 years 1 month ago #242543

Thanks, i've just send you the mail.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #242559

Hi,

Problem solved, we had a fix on our side but not yet in the latest release.
I have edited the view "product / show_quantity" to solve that issue until we release the next version.

The following user(s) said Thank You: raphaelr@alkaonline.be

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

  • Posts: 12
  • Thank you received: 0
9 years 3 weeks ago #242865

Thanks a lot :-)
Have a nice day.

Last edit: 9 years 2 weeks ago by raphaelr@alkaonline.be.

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

  • Posts: 12
  • Thank you received: 0
9 years 2 weeks ago #243641

Hello,
excuse me ton insist but there's the same problem on the checkout page.
Thanks in advance.


PS: I've a strange error after the checkout : 0 - Invalid address:
I've searched but the only solution suggested is this www.hikashop.com/forum/checkout/883603-4...-process.html#235445
But already done in the latest hikashop version.

Attachments:
Last edit: 9 years 2 weeks ago by raphaelr@alkaonline.be.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 2 weeks ago #243697

Hi,

Please replace the content of the view "checkout / cart" by this one:

<?php
$this->setLayout('listing_price');
$this->params->set('show_quantity_field', 0);
$comp_description = $this->params->get('comp_description');
if(empty($comp_description)){
	$this->params->set('comp_description',JText::_('CART_EMPTY'));
}
if($this->paymentType == 'no'){
	$this->nextButton = false;
}
$app = JFactory::getApplication();
?>
<div id="hikashop_checkout_cart" class="hikashop_checkout_cart">
<?php
	if(empty($this->rows)) {
		echo $this->params->get('comp_description');
	} else {
		if($this->config->get('print_cart',0)&&JRequest::getVar('tmpl','')!='component'){ ?>
			<div class="hikashop_checkout_cart_print_link">
				<a title="<?php echo JText::_('HIKA_PRINT');?>" class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="<?php echo hikashop_completeLink('checkout&task=printcart',true); ?>">
					<img src="<?php echo HIKASHOP_IMAGES; ?>print.png" alt="<?php echo JText::_('HIKA_PRINT');?>"/>
				</a>
			</div>
<?php
		}

		foreach($this->rows as $i => $row) {
			if(empty($row->cart_product_quantity)) continue;
			if(!empty($row->product_min_per_order)) {
				if($row->product_min_per_order>$row->cart_product_quantity) {
					$this->nextButton = false;
					$app->enqueueMessage(JText::sprintf('YOU_NEED_TO_ORDER_AT_LEAST_X_X',$row->product_min_per_order,$row->product_name));
				}
			}
		}
		$row_count = 4;
?>
	<br/>
		<table class="table table-striped table-hover" width="100%">
			<thead>
				<tr>
					<?php if($this->params->get('show_cart_image')){ $row_count++;?>
						<th id="hikashop_cart_product_image_title" class="hikashop_cart_product_image_title hikashop_cart_title">
							<?php echo JText::_('CART_PRODUCT_IMAGE'); ?>
						</th>
					<?php } ?>
					<th id="hikashop_cart_product_name_title" class="hikashop_cart_product_name_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_NAME'); ?>
					</th>
					<th id="hikashop_cart_product_price_title" class="hikashop_cart_product_price_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>
					</th>
					<th id="hikashop_cart_product_quantity_title" class="hikashop_cart_product_quantity_title hikashop_cart_title">
						<?php echo JText::_('PRODUCT_QUANTITY'); ?>
					</th>
					<th id="hikashop_cart_product_total_title" class="hikashop_cart_product_total_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_TOTAL_PRICE'); ?>
					</th>
				</tr>
			</thead>

			<tbody>
				<?php
					$k = 0;
					$group = $this->config->get('group_options',0);
					$defaultParams = $this->config->get('default_params');
					$productClass = hikashop_get('class.product');
					$quantityDisplayType = hikashop_get('type.quantitydisplay');

					foreach($this->rows as $i => $row){
						if(empty($row->cart_product_quantity)) continue;
						if($group && $row->cart_product_option_parent_id) continue;
						$productClass->addAlias($row);
						?>
						<tr class="row<?php echo $k; ?>">
							<?php if($this->params->get('show_cart_image')){ ?>
								<td data-title="<?php echo JText::_('CART_PRODUCT_IMAGE'); ?>" class="hikashop_cart_product_image_value">
									<?php
										$width = $this->config->get('thumbnail_x');
										$height = $this->config->get('thumbnail_y');
										if(!empty($row->images)){
											$image = reset($row->images);
											$this->image->checkSize($width,$height,$image);
										}else{
											$image = null;
										}
										if($image && !$this->config->get('thumbnail')){
											echo '<img src="'.$this->image->uploadFolder_url.$image->file_path.'" alt="'.$image->file_name.'" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
										}else{ ?>
											<div class="hikashop_cart_product_image_thumb" >
											<?php
												$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
												$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
												if($img->success) {
													echo '<img class="hikashop_product_checkout_cart_image" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/>';
												}
												?>
											</div>
									<?php } ?>
								</td>
							<?php } ?>
							<td data-title="<?php echo JText::_('CART_PRODUCT_NAME'); ?>" class="hikashop_cart_product_name_value">
								<p class="hikashop_cart_product_name">
									<?php
										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;
										} ?>
									<?php if(@$defaultParams['link_to_product_page']){ ?><a class="hikashop_no_print" href="<?php echo hikashop_contentLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid,$row);?>" ><?php } ?>
										<?php echo $row->product_name; ?>
										<?php if ($this->config->get('show_code')) { ?>
											<span class="hikashop_product_code_checkout"><?php echo $row->product_code; ?></span>
										<?php } ?>
									<?php if(@$defaultParams['link_to_product_page']){ ?></a><?php } ?>
									<?php
									if($group){
										$display_item_price=false;
										foreach($this->rows as $j => $optionElement){
											if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
											if(!empty($optionElement->prices[0])){
												$display_item_price = true;
											}

										}
										if($display_item_price){
											$this->row=&$row;
											$this->unit=true;
											echo  ' <span class="hikashop_product_base_price">'.strip_tags($this->loadTemplate()).'</span>';
										}
									}
									?>
								</p>
								<?php
								ob_start();
								if(hikashop_level(2) && !empty($this->extraFields['item'])){
									foreach($this->extraFields['item'] as $field){
										$namekey = $field->field_namekey;
										if(empty($row->$namekey) || !strlen($row->$namekey)) continue;
										echo '<p class="hikashop_cart_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).': '.$this->fieldsClass->show($field,$row->$namekey).'</p>';
									}
								}
								$input='';
								if($group){
									foreach($this->rows as $j => $optionElement){
										if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
										if(!empty($optionElement->prices[0])){
											if(!isset($row->prices[0])){
												$row->prices[0] = new stdClass();
												$row->prices[0]->price_value=0;
												$row->prices[0]->price_value_with_tax=0;
												$row->prices[0]->price_currency_id = hikashop_getCurrency();
											}
											foreach(get_object_vars($row->prices[0]) as $key => $value){
												if(is_object($value)){
													foreach(get_object_vars($value) as $key2 => $var2){
														if(strpos($key2,'price_value')!==false) $row->prices[0]->$key->$key2 +=@$optionElement->prices[0]->$key->$key2;
													}
												}else{
													if(strpos($key,'price_value')!==false) $row->prices[0]->$key+=@$optionElement->prices[0]->$key;
												}
											}
										}
										if(empty($optionElement->variant_name)){
											if(empty($optionElement->characteristics_text)){
												$text = $optionElement->product_name;
											}else{
												$text = $optionElement->characteristics_text;
											}
										}else{
											$text = $optionElement->variant_name;
										}
										echo '<p class="hikashop_cart_option_name">'.$text;
										if(@$optionElement->prices[0]->price_value_with_tax>0){
											echo ' ( + ';
											$this->row=&$optionElement;
											$this->unit=true;
											echo strip_tags($this->loadTemplate()).' )';
										}
										echo '</p>';
										$input .='document.getElementById(\'product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
										if(empty($this->disable_modifications)) echo '<input type="hidden" id="product_option_'.$optionElement->cart_product_id.'" name="item['.$optionElement->cart_product_id.']" value="'.$row->cart_product_quantity.'"/>';
									}
								}
								$html = ob_get_clean();
								if(!empty($html)){
									echo '<div class="hikashop_cart_product_custom_item_fields">'.$html.'</div>';
								}
								?>
							</td>
							<td data-title="<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>" class="hikashop_cart_product_price_value">
								<?php
									$this->row =& $row;
									$this->unit = true;
									echo $this->loadTemplate();
								?>
								<?php if(HIKASHOP_RESPONSIVE){ ?><span class="visible-phone"><?php echo JText::_('PER_UNIT'); ?></span><?php } ?>
							</td>
							<td data-title="<?php echo JText::_('PRODUCT_QUANTITY'); ?>" class="hikashop_cart_product_quantity_value">
								<?php
								if(empty($this->disable_modifications)){
									if($row->product_parent_id != 0 && isset($row->main_product_quantity_layout)){
										$row->product_quantity_layout = $row->main_product_quantity_layout;
									}
									if($row->product_quantity_layout == 'show_select' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select')){
										$min_quantity = (@$this->row->main->product_min_per_order) ? (int)@$this->row->main->product_min_per_order : (int)@$this->row->product_min_per_order;
										$max_quantity = (@$this->row->main->product_max_per_order) ? (int)@$this->row->main->product_max_per_order : (int)@$this->row->product_max_per_order;
										if($min_quantity == 0)
											$min_quantity = 1;
										if($max_quantity == 0)
											$max_quantity = (int)$min_quantity * 15;
										$values = array();
										if($this->params->get('show_delete',1)){
											$values[] = JHTML::_('select.option', 0, '0');
										}
										for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
											$values[] = JHTML::_('select.option', $j, $j);
										}
										echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', '', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
									}else{
										?>
										<input id="hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?>}; return true;" />
										<?php
									}
								?>
									<div class="hikashop_cart_product_quantity_refresh">
										<a class="hikashop_no_print" href="#" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">
											<img src="<?php echo HIKASHOP_IMAGES . 'refresh.png';?>" border="0" alt="<?php echo JText::_('HIKA_REFRESH'); ?>" />
										</a>
									</div>
									<?php if($this->params->get('show_delete',1)){ ?>
										<div class="hikashop_cart_product_quantity_delete">
											<a class="hikashop_no_print" href="<?php echo hikashop_completeLink('product&task=updatecart&product_id='.$row->product_id.'&quantity=0&return_url='.urlencode(base64_encode(urldecode($this->params->get('url'))))); ?>" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0; <?php echo $input; ?> qty_field.form.submit();} return false;" title="<?php echo JText::_('HIKA_DELETE'); ?>">
												<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
											</a>
										</div>
									<?php }
								}else{
									echo $row->cart_product_quantity;
								}
								 ?>
							</td>
							<td data-title="<?php echo JText::_('CART_PRODUCT_TOTAL_PRICE'); ?>" class="hikashop_cart_product_total_value">
								<?php
									$this->row=&$row;
									$this->unit=false;
									echo $this->loadTemplate();
								?>
							</td>
						</tr>
						<?php
						$k = 1-$k;
					}
				?>

<?php

		if($this->params->get('show_cart_image'))
			$td = '<td colspan="3" class="hikashop_cart_empty_footer"></td>';
		else
			$td = '<td colspan="2" class="hikashop_cart_empty_footer"></td>';

		$taxes = $this->currencyHelper->round($this->full_total->prices[0]->price_value_with_tax-$this->full_total->prices[0]->price_value,$this->currencyHelper->getRounding($this->full_total->prices[0]->price_currency_id));
		if(!empty($this->coupon) || !empty($this->shipping) || !empty($this->additional) || bccomp($taxes,0,5)) {
?>
				<tr class="margin"><?php echo $td; ?><td></td><td></td></tr>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value" data-title="<?php echo JText::_('SUBTOTAL'); ?>">
						<span class="hikashop_checkout_cart_subtotal">
							<?php
								if($this->params->get('price_with_tax')){
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value_with_tax,@$this->total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value,@$this->total->prices[0]->price_currency_id);
								}
							?>
						</span>
					</td>
				</tr>
<?php
		}
		if(!empty($this->coupon)) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_coupon_title" class="hikashop_cart_coupon_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_COUPON'); ?>
					</td>
					<td class="hikashop_cart_coupon_value" data-title="<?php echo JText::_('HIKASHOP_COUPON'); ?>">
						<span class="hikashop_checkout_cart_coupon">
						<?php
							if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax')){
								echo $this->currencyHelper->format(@$this->coupon->discount_value_without_tax*-1,@$this->coupon->discount_currency_id);
							}else{
								echo $this->currencyHelper->format(@$this->coupon->discount_value*-1,@$this->coupon->discount_currency_id);
							}
						?>
						</span>
					</td>
				</tr>
<?php
		}

		if(!empty($this->shipping)) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_shipping_title" class="hikashop_cart_shipping_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_SHIPPING'); ?>
					</td>
					<td class="hikashop_cart_shipping_value" data-title="<?php echo JText::_('HIKASHOP_SHIPPING'); ?>">
						<span class="hikashop_checkout_cart_shipping">
<?php
			if(isset($this->value)) {
				echo $this->value;
			} else {
				$shipping_price = null;
				foreach($this->shipping as $shipping) {
					if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
						$shipping->shipping_price = $shipping->shipping_price_with_tax;
						//$shipping->shipping_price_with_tax = 0.0;
					}
					if(isset($shipping->shipping_price)) {
						if($shipping_price === null)
							$shipping_price = 0.0;
						if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
							$shipping_price += $shipping->shipping_price;
						} else {
							$shipping_price += $shipping->shipping_price_with_tax;
						}
					}
				}
				if($shipping_price !== null) {
					echo $this->currencyHelper->format($shipping_price, $this->full_total->prices[0]->price_currency_id);
				}
			}
?>
						</span>
					</td>
				</tr>
<?php
		}

		 if(!empty($this->payment) && $this->payment->payment_price != 0) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_payment_title" class="hikashop_cart_payment_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_PAYMENT'); ?>
					</td>
					<td class="hikashop_cart_payment_value" data-title="<?php echo Jtext::_('HIKASHOP_PAYMENT'); ?>">
						<span class="hikashop_checkout_cart_payment">
						<?php
							if(!isset($this->payment->payment_price) && isset($this->payment->payment_price_with_tax) ) {
								if(isset($this->value)) {
									echo $this->value;
								} else {
									$this->payment->payment_price = 0.0;
									$this->payment->payment_price_with_tax = 0.0;
								}
							}
							if(isset($this->payment->payment_price)) {
								if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($this->payment->payment_price_with_tax) ){
									echo $this->currencyHelper->format(@$this->payment->payment_price,$this->full_total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->payment->payment_price_with_tax,$this->full_total->prices[0]->price_currency_id);
								}
							}
						?>
						</span>
					</td>
				</tr>
<?php
		}

		if(!empty($this->additional)) {
			$exclude_additionnal = explode(',', $this->config->get('order_additional_hide', ''));
			foreach($this->additional as $k => $additional) {
				if(in_array($additional->name, $exclude_additionnal))
					continue;
?>
				<tr id="hikashop_checkout_cart_additional_<?php echo str_replace(' ','_',$k); ?>_line" >
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_additional_<?php echo str_replace(' ','_',$k); ?>_title" class="hikashop_cart_additional_title hikashop_cart_title"><?php
						echo JText::_($additional->name);
					?></td>
					<td class="hikashop_cart_additional_value" data-title="<?php echo JText::_($additional->name); ?>">
						<span class="hikashop_checkout_cart_additional">
<?php
				if(!empty($additional->price_value) || empty($additional->value)) {
					if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax')){
						echo $this->currencyHelper->format(@$additional->price_value,$additional->price_currency_id);
					}else{
						echo $this->currencyHelper->format(@$additional->price_value_with_tax,$additional->price_currency_id);
					}
				} else {
					echo $additional->value;
				}
?>
						</span>
					</td>
				</tr>
<?php
			}
		}

		if(bccomp($taxes,0,5)){
			if($this->config->get('detailed_tax_display') && isset($this->full_total->prices[0]->taxes)) {
				foreach($this->full_total->prices[0]->taxes as $tax) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo $tax->tax_namekey; ?>
					</td>
					<td class="hikashop_cart_tax_value" data-title="<?php echo $tax->tax_namekey; ?>">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($tax->tax_amount,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
				}
			} else {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value" data-title="<?php echo Jtext::_('TAXES'); ?>">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($taxes,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
			}
		}
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_final_total_title" class="hikashop_cart_total_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_TOTAL'); ?>
					</td>
					<td class="hikashop_cart_total_value" data-title="<?php echo Jtext::_('HIKASHOP_TOTAL'); ?>">
						<span class="hikashop_checkout_cart_final_total">
						<?php
							echo $this->currencyHelper->format($this->full_total->prices[0]->price_value_with_tax,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
			</tbody>
		</table>
		<?php
		if(empty($this->disable_modifications) && $this->params->get('show_quantity')){ ?>
			<noscript>
				<input id="hikashop_checkout_cart_quantity_button" class="btn button" type="submit" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
			</noscript>
		<?php }
	}
	$config =& hikashop_config();
	if(hikashop_level(1) && $config->get('checkout_convert_cart') && $config->get('enable_wishlist') && (($config->get('hide_wishlist_guest', 1) && hikashop_loadUser() != null) || !$config->get('hide_wishlist_guest', 1))){
		$this->params->set('cart_type','wishlist');
		echo $this->cart->displayButton(JText::_('CART_TO_WISHLIST'),'wishlist',$this->params,hikashop_completeLink('cart&task=convert&cart_type=cart&cart_id='.$this->full_cart->cart_id.$url_itemid),'window.location.href = \''.hikashop_completeLink('cart&task=convert&cart_type=cart&cart_id='.$this->full_cart->cart_id.$url_itemid).'\';return false;');
	}
?>
</div>

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

  • Posts: 12
  • Thank you received: 0
9 years 2 weeks ago #243756

Hi, thanks for your answer.

Not seeing any difference

Last edit: 9 years 2 weeks ago by raphaelr@alkaonline.be.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 2 weeks ago #243809

Hi,

Indeed the modification were not done there too, here is a patched version of that view:

<?php
$this->setLayout('listing_price');
$this->params->set('show_quantity_field', 0);
$comp_description = $this->params->get('comp_description');
if(empty($comp_description)){
	$this->params->set('comp_description',JText::_('CART_EMPTY'));
}
if($this->paymentType == 'no'){
	$this->nextButton = false;
}
$app = JFactory::getApplication();
?>
<div id="hikashop_checkout_cart" class="hikashop_checkout_cart">
<?php
	if(empty($this->rows)) {
		echo $this->params->get('comp_description');
	} else {
		if($this->config->get('print_cart',0)&&JRequest::getVar('tmpl','')!='component'){ ?>
			<div class="hikashop_checkout_cart_print_link">
				<a title="<?php echo JText::_('HIKA_PRINT');?>" class="modal" rel="{handler: 'iframe', size: {x: 760, y: 480}}" href="<?php echo hikashop_completeLink('checkout&task=printcart',true); ?>">
					<img src="<?php echo HIKASHOP_IMAGES; ?>print.png" alt="<?php echo JText::_('HIKA_PRINT');?>"/>
				</a>
			</div>
<?php
		}

		foreach($this->rows as $i => $row) {
			if(empty($row->cart_product_quantity)) continue;
			if(!empty($row->product_min_per_order)) {
				if($row->product_min_per_order>$row->cart_product_quantity) {
					$this->nextButton = false;
					$app->enqueueMessage(JText::sprintf('YOU_NEED_TO_ORDER_AT_LEAST_X_X',$row->product_min_per_order,$row->product_name));
				}
			}
		}
		$row_count = 4;
?>
	<br/>
		<table class="table table-striped table-hover" width="100%">
			<thead>
				<tr>
					<?php if($this->params->get('show_cart_image')){ $row_count++;?>
						<th id="hikashop_cart_product_image_title" class="hikashop_cart_product_image_title hikashop_cart_title">
							<?php echo JText::_('CART_PRODUCT_IMAGE'); ?>
						</th>
					<?php } ?>
					<th id="hikashop_cart_product_name_title" class="hikashop_cart_product_name_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_NAME'); ?>
					</th>
					<th id="hikashop_cart_product_price_title" class="hikashop_cart_product_price_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>
					</th>
					<th id="hikashop_cart_product_quantity_title" class="hikashop_cart_product_quantity_title hikashop_cart_title">
						<?php echo JText::_('PRODUCT_QUANTITY'); ?>
					</th>
					<th id="hikashop_cart_product_total_title" class="hikashop_cart_product_total_title hikashop_cart_title">
						<?php echo JText::_('CART_PRODUCT_TOTAL_PRICE'); ?>
					</th>
				</tr>
			</thead>

			<tbody>
				<?php
					$k = 0;
					$group = $this->config->get('group_options',0);
					$defaultParams = $this->config->get('default_params');
					$productClass = hikashop_get('class.product');
					$quantityDisplayType = hikashop_get('type.quantitydisplay');

					foreach($this->rows as $i => $row){
						if(empty($row->cart_product_quantity)) continue;
						if($group && $row->cart_product_option_parent_id) continue;
						$productClass->addAlias($row);
						?>
						<tr class="row<?php echo $k; ?>">
							<?php if($this->params->get('show_cart_image')){ ?>
								<td data-title="<?php echo JText::_('CART_PRODUCT_IMAGE'); ?>" class="hikashop_cart_product_image_value">
									<?php
										$width = $this->config->get('thumbnail_x');
										$height = $this->config->get('thumbnail_y');
										if(!empty($row->images)){
											$image = reset($row->images);
											$this->image->checkSize($width,$height,$image);
										}else{
											$image = null;
										}
										if($image && !$this->config->get('thumbnail')){
											echo '<img src="'.$this->image->uploadFolder_url.$image->file_path.'" alt="'.$image->file_name.'" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
										}else{ ?>
											<div class="hikashop_cart_product_image_thumb" >
											<?php
												$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
												$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
												if($img->success) {
													echo '<img class="hikashop_product_checkout_cart_image" title="'.$this->escape(@$image->file_description).'" alt="'.$this->escape(@$image->file_name).'" src="'.$img->url.'"/>';
												}
												?>
											</div>
									<?php } ?>
								</td>
							<?php } ?>
							<td data-title="<?php echo JText::_('CART_PRODUCT_NAME'); ?>" class="hikashop_cart_product_name_value">
								<p class="hikashop_cart_product_name">
									<?php
										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;
										} ?>
									<?php if(@$defaultParams['link_to_product_page']){ ?><a class="hikashop_no_print" href="<?php echo hikashop_contentLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid,$row);?>" ><?php } ?>
										<?php echo $row->product_name; ?>
										<?php if ($this->config->get('show_code')) { ?>
											<span class="hikashop_product_code_checkout"><?php echo $row->product_code; ?></span>
										<?php } ?>
									<?php if(@$defaultParams['link_to_product_page']){ ?></a><?php } ?>
									<?php
									if($group){
										$display_item_price=false;
										foreach($this->rows as $j => $optionElement){
											if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
											if(!empty($optionElement->prices[0])){
												$display_item_price = true;
											}

										}
										if($display_item_price){
											$this->row=&$row;
											$this->unit=true;
											echo  ' <span class="hikashop_product_base_price">'.strip_tags($this->loadTemplate()).'</span>';
										}
									}
									?>
								</p>
								<?php
								ob_start();
								if(hikashop_level(2) && !empty($this->extraFields['item'])){
									foreach($this->extraFields['item'] as $field){
										$namekey = $field->field_namekey;
										if(empty($row->$namekey) || !strlen($row->$namekey)) continue;
										echo '<p class="hikashop_cart_item_'.$namekey.'">'.$this->fieldsClass->getFieldName($field).': '.$this->fieldsClass->show($field,$row->$namekey).'</p>';
									}
								}
								$input='';
								if($group){
									foreach($this->rows as $j => $optionElement){
										if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
										if(!empty($optionElement->prices[0])){
											if(!isset($row->prices[0])){
												$row->prices[0] = new stdClass();
												$row->prices[0]->price_value=0;
												$row->prices[0]->price_value_with_tax=0;
												$row->prices[0]->price_currency_id = hikashop_getCurrency();
											}
											foreach(get_object_vars($row->prices[0]) as $key => $value){
												if(is_object($value)){
													foreach(get_object_vars($value) as $key2 => $var2){
														if(strpos($key2,'price_value')!==false) $row->prices[0]->$key->$key2 +=@$optionElement->prices[0]->$key->$key2;
													}
												}else{
													if(strpos($key,'price_value')!==false) $row->prices[0]->$key+=@$optionElement->prices[0]->$key;
												}
											}
										}
										if(empty($optionElement->variant_name)){
											if(empty($optionElement->characteristics_text)){
												$text = $optionElement->product_name;
											}else{
												$text = $optionElement->characteristics_text;
											}
										}else{
											$text = $optionElement->variant_name;
										}
										echo '<p class="hikashop_cart_option_name">'.$text;
										if(@$optionElement->prices[0]->price_value_with_tax>0){
											echo ' ( + ';
											$this->row=&$optionElement;
											$this->unit=true;
											echo strip_tags($this->loadTemplate()).' )';
										}
										echo '</p>';
										$input .='document.getElementById(\'product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
										if(empty($this->disable_modifications)) echo '<input type="hidden" id="product_option_'.$optionElement->cart_product_id.'" name="item['.$optionElement->cart_product_id.']" value="'.$row->cart_product_quantity.'"/>';
									}
								}
								$html = ob_get_clean();
								if(!empty($html)){
									echo '<div class="hikashop_cart_product_custom_item_fields">'.$html.'</div>';
								}
								?>
							</td>
							<td data-title="<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>" class="hikashop_cart_product_price_value">
								<?php
									$this->row =& $row;
									$this->unit = true;
									echo $this->loadTemplate();
								?>
								<?php if(HIKASHOP_RESPONSIVE){ ?><span class="visible-phone"><?php echo JText::_('PER_UNIT'); ?></span><?php } ?>
							</td>
							<td data-title="<?php echo JText::_('PRODUCT_QUANTITY'); ?>" class="hikashop_cart_product_quantity_value">
								<?php
								if(empty($this->disable_modifications)){
									if($row->product_parent_id != 0 && isset($row->main_product_quantity_layout)){
										$row->product_quantity_layout = $row->main_product_quantity_layout;
									}
									$min_quantity = $this->row->product_min_per_order;
									$max_quantity = $this->row->product_max_per_order;
									if($min_quantity == 0)
										$min_quantity = 1;
									if($max_quantity == 0)
										$max_quantity = (int)$min_quantity * 15;
									if($row->product_quantity_layout == 'show_select' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select')){
										$values = array();
										if($this->params->get('show_delete',1)){
											$values[] = JHTML::_('select.option', 0, '0');
										}
										for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
											$values[] = JHTML::_('select.option', $j, $j);
										}
										echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', '', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
									}elseif($row->product_quantity_layout == 'show_select_price' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select_price')){
										$pricesSet = array();
										$values = array();
										foreach($row->prices as $price){
											if($price->price_min_quantity == 0)
												$price->price_min_quantity = 1;
											if(in_array($price->price_min_quantity, $pricesSet) || $price->price_min_quantity < $min_quantity)
												continue;
											$pricesSet[] = $price->price_min_quantity;
											$values[] = JHTML::_('select.option', $price->price_min_quantity, $price->price_min_quantity);
										}
										if(empty($values)){
											for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
												$values[] = JHTML::_('select.option', $price->price_min_quantity, $price->price_min_quantity);
											}
										}
										echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', '', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
									}else{
										?>
										<input id="hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?>}; return true;" />
										<?php
									}
								?>
									<div class="hikashop_cart_product_quantity_refresh">
										<a class="hikashop_no_print" href="#" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">
											<img src="<?php echo HIKASHOP_IMAGES . 'refresh.png';?>" border="0" alt="<?php echo JText::_('HIKA_REFRESH'); ?>" />
										</a>
									</div>
									<?php if($this->params->get('show_delete',1)){ ?>
										<div class="hikashop_cart_product_quantity_delete">
											<a class="hikashop_no_print" href="<?php echo hikashop_completeLink('product&task=updatecart&product_id='.$row->product_id.'&quantity=0&return_url='.urlencode(base64_encode(urldecode($this->params->get('url'))))); ?>" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0; <?php echo $input; ?> qty_field.form.submit();} return false;" title="<?php echo JText::_('HIKA_DELETE'); ?>">
												<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
											</a>
										</div>
									<?php }
								}else{
									echo $row->cart_product_quantity;
								}
								 ?>
							</td>
							<td data-title="<?php echo JText::_('CART_PRODUCT_TOTAL_PRICE'); ?>" class="hikashop_cart_product_total_value">
								<?php
									$this->row=&$row;
									$this->unit=false;
									echo $this->loadTemplate();
								?>
							</td>
						</tr>
						<?php
						$k = 1-$k;
					}
				?>

<?php

		if($this->params->get('show_cart_image'))
			$td = '<td colspan="3" class="hikashop_cart_empty_footer"></td>';
		else
			$td = '<td colspan="2" class="hikashop_cart_empty_footer"></td>';

		$taxes = round($this->full_total->prices[0]->price_value_with_tax-$this->full_total->prices[0]->price_value,$this->currencyHelper->getRounding($this->full_total->prices[0]->price_currency_id));
		if(!empty($this->coupon) || !empty($this->shipping) || !empty($this->additional) || bccomp($taxes,0,5)) {
?>
				<tr class="margin"><?php echo $td; ?><td></td><td></td></tr>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_total2_title" class="hikashop_cart_subtotal_title hikashop_cart_title">
						<?php echo JText::_('SUBTOTAL'); ?>
					</td>
					<td class="hikashop_cart_subtotal_value" data-title="<?php echo JText::_('SUBTOTAL'); ?>">
						<span class="hikashop_checkout_cart_subtotal">
							<?php
								if($this->params->get('price_with_tax')){
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value_with_tax,@$this->total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->total->prices[0]->price_value,@$this->total->prices[0]->price_currency_id);
								}
							?>
						</span>
					</td>
				</tr>
<?php
		}
		if(!empty($this->coupon)) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_coupon_title" class="hikashop_cart_coupon_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_COUPON'); ?>
					</td>
					<td class="hikashop_cart_coupon_value" data-title="<?php echo JText::_('HIKASHOP_COUPON'); ?>">
						<span class="hikashop_checkout_cart_coupon">
						<?php
							if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax')){
								echo $this->currencyHelper->format(@$this->coupon->discount_value_without_tax*-1,@$this->coupon->discount_currency_id);
							}else{
								echo $this->currencyHelper->format(@$this->coupon->discount_value*-1,@$this->coupon->discount_currency_id);
							}
						?>
						</span>
					</td>
				</tr>
<?php
		}

		if(!empty($this->shipping)) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_shipping_title" class="hikashop_cart_shipping_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_SHIPPING'); ?>
					</td>
					<td class="hikashop_cart_shipping_value" data-title="<?php echo JText::_('HIKASHOP_SHIPPING'); ?>">
						<span class="hikashop_checkout_cart_shipping">
<?php
			if(isset($this->value)) {
				echo $this->value;
			} else {
				$shipping_price = null;
				foreach($this->shipping as $shipping) {
					if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
						$shipping->shipping_price = $shipping->shipping_price_with_tax;
						//$shipping->shipping_price_with_tax = 0.0;
					}
					if(isset($shipping->shipping_price)) {
						if($shipping_price === null)
							$shipping_price = 0.0;
						if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
							$shipping_price += $shipping->shipping_price;
						} else {
							$shipping_price += $shipping->shipping_price_with_tax;
						}
					}
				}
				if($shipping_price !== null) {
					echo $this->currencyHelper->format($shipping_price, $this->full_total->prices[0]->price_currency_id);
				}
			}
?>
						</span>
					</td>
				</tr>
<?php
		}

		 if(!empty($this->payment) && $this->payment->payment_price != 0) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_payment_title" class="hikashop_cart_payment_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_PAYMENT'); ?>
					</td>
					<td class="hikashop_cart_payment_value" data-title="<?php echo Jtext::_('HIKASHOP_PAYMENT'); ?>">
						<span class="hikashop_checkout_cart_payment">
						<?php
							if(!isset($this->payment->payment_price) && isset($this->payment->payment_price_with_tax) ) {
								if(isset($this->value)) {
									echo $this->value;
								} else {
									$this->payment->payment_price = 0.0;
									$this->payment->payment_price_with_tax = 0.0;
								}
							}
							if(isset($this->payment->payment_price)) {
								if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax') || !isset($this->payment->payment_price_with_tax) ){
									echo $this->currencyHelper->format(@$this->payment->payment_price,$this->full_total->prices[0]->price_currency_id);
								}else{
									echo $this->currencyHelper->format(@$this->payment->payment_price_with_tax,$this->full_total->prices[0]->price_currency_id);
								}
							}
						?>
						</span>
					</td>
				</tr>
<?php
		}

		if(!empty($this->additional)) {
			$exclude_additionnal = explode(',', $this->config->get('order_additional_hide', ''));
			foreach($this->additional as $k => $additional) {
				if(in_array($additional->name, $exclude_additionnal))
					continue;
?>
				<tr id="hikashop_checkout_cart_additional_<?php echo str_replace(' ','_',$k); ?>_line" >
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_additional_<?php echo str_replace(' ','_',$k); ?>_title" class="hikashop_cart_additional_title hikashop_cart_title"><?php
						echo JText::_($additional->name);
					?></td>
					<td class="hikashop_cart_additional_value" data-title="<?php echo JText::_($additional->name); ?>">
						<span class="hikashop_checkout_cart_additional">
<?php
				if(!empty($additional->price_value) || empty($additional->value)) {
					if(bccomp($taxes,0,5)==0 || !$this->params->get('price_with_tax')){
						echo $this->currencyHelper->format(@$additional->price_value,$additional->price_currency_id);
					}else{
						echo $this->currencyHelper->format(@$additional->price_value_with_tax,$additional->price_currency_id);
					}
				} else {
					echo $additional->value;
				}
?>
						</span>
					</td>
				</tr>
<?php
			}
		}

		if(bccomp($taxes,0,5)){
			if($this->config->get('detailed_tax_display') && isset($this->full_total->prices[0]->taxes)) {
				foreach($this->full_total->prices[0]->taxes as $tax) {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo $tax->tax_namekey; ?>
					</td>
					<td class="hikashop_cart_tax_value" data-title="<?php echo $tax->tax_namekey; ?>">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($tax->tax_amount,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
				}
			} else {
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_tax_title" class="hikashop_cart_tax_title hikashop_cart_title">
						<?php echo JText::_('TAXES'); ?>
					</td>
					<td class="hikashop_cart_tax_value" data-title="<?php echo Jtext::_('TAXES'); ?>">
						<span class="hikashop_checkout_cart_taxes">
						<?php
							echo $this->currencyHelper->format($taxes,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
<?php
			}
		}
?>
				<tr>
					<?php echo $td; ?>
					<td id="hikashop_checkout_cart_final_total_title" class="hikashop_cart_total_title hikashop_cart_title">
						<?php echo JText::_('HIKASHOP_TOTAL'); ?>
					</td>
					<td class="hikashop_cart_total_value" data-title="<?php echo Jtext::_('HIKASHOP_TOTAL'); ?>">
						<span class="hikashop_checkout_cart_final_total">
						<?php
							echo $this->currencyHelper->format($this->full_total->prices[0]->price_value_with_tax,$this->full_total->prices[0]->price_currency_id);
						?>
						</span>
					</td>
				</tr>
			</tbody>
		</table>
		<?php
		if(empty($this->disable_modifications) && $this->params->get('show_quantity')){ ?>
			<noscript>
				<input id="hikashop_checkout_cart_quantity_button" class="btn button" type="submit" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
			</noscript>
		<?php }
	}
	$config =& hikashop_config();
	if(hikashop_level(1) && $config->get('checkout_convert_cart') && $config->get('enable_wishlist') && (($config->get('hide_wishlist_guest', 1) && hikashop_loadUser() != null) || !$config->get('hide_wishlist_guest', 1))){
		$this->params->set('cart_type','wishlist');
		echo $this->cart->displayButton(JText::_('CART_TO_WISHLIST'),'wishlist',$this->params,hikashop_completeLink('cart&task=convert&cart_type=cart&cart_id='.$this->full_cart->cart_id.$url_itemid),'window.location.href = \''.hikashop_completeLink('cart&task=convert&cart_type=cart&cart_id='.$this->full_cart->cart_id.$url_itemid).'\';return false;');
	}
?>
</div>
And here the version for the view "product / cart" corresponding to the cart module:
<?php

if($this->cart_type == 'cart') {
	$convertText = JText::_('CART_TO_WISHLIST');
	$displayText = JText::_('DISPLAY_THE_CART');
	$displayAllText = JText::_('DISPLAY_THE_CARTS');
	$emptyText = JText::_('CART_EMPTY');
} else {
	$convertText = JText::_('WISHLIST_TO_CART');
	$displayText = JText::_('DISPLAY_THE_WISHLIST');
	$displayAllText = JText::_('DISPLAY_THE_WISHLISTS');
	$emptyText = JText::_('WISHLIST_EMPTY');
}

// Initiate var from HikaShop backend options :
$hidecart = $this->params->get('hide_cart');
$desc = trim($this->params->get('msg') );

if(empty($desc) && $desc != '0')
	$desc = $emptyText;

// Hide empty cart => default empty cart message :
if ($hidecart == '0' || !isset($hidecart) )
	$desc = $emptyText;

// Hide empty Cart => Hide cart :
if ($hidecart == '2') {
	$desc = "";
}

if(empty($this->rows)) {
 	if(!empty($desc) || $desc == '0') {
		echo $this->notice_html;
?>
		<div id="hikashop_cart" class="hikashop_cart"><?php
			echo $desc;
		?></div>
		<div class="clear_both"></div>
<?php
	}

	if (JRequest::getWord('tmpl', '') == 'component') {
		if(!headers_sent())
			header('Content-Type: text/css; charset=utf-8');
		exit;
	}
	return;
}

$this->setLayout('listing_price');
$this->params->set('show_quantity_field', 0);

?>
<div id="hikashop_cart" class="hikashop_cart">
<?php
	if($this->config->get('print_cart', 0) && JRequest::getVar('tmpl', '') != 'component' && $this->cart_type == 'cart') {
?>
	<div class="hikashop_checkout_cart_print_link">
	<?php
		echo $this->popup->display(
			'<img src="'.HIKASHOP_IMAGES.'print.png" alt="'.JText::_('HIKA_PRINT').'" />',
			'HIKA_PRINT',
			hikashop_completeLink('checkout&task=printcart',true),
			'hikashop_print_popup',
			760, 480, '', '', 'link'
		);
	?>
	</div>
<?php
	} else if($this->params->get('from','display') != 'module') {
?>
	<div class="hikashop_product_cart_links">
		<div class="hikashop_product_cart_show_carts_link"><?php
			echo $this->cartHelper->displayButton($displayAllText, 'cart', $this->params, hikashop_completeLink('cart&task=showcarts&cart_type='.$this->cart_type . $this->cart_itemid), '');
		?>
		</div>
		<div class="hikashop_product_cart_mail_link">
		<?php
			echo $this->popup->display(
				'<img src="'.HIKASHOP_IMAGES.'go.png" alt="'.JText::_('HIKA_EMAIL').'" />',
				'HIKA_EMAIL',
				hikashop_completeLink('product&task=sendcart',true),
				'hikashop_email_popup',
				760, 480, '', '', 'link'
			);
		?>
		</div>
		<div class="hikashop_product_cart_print_link">
		<?php
			echo $this->popup->display(
				'<img src="'.HIKASHOP_IMAGES.'print.png" alt="'.JText::_('HIKA_PRINT').'" />',
				'HIKA_PRINT',
				hikashop_completeLink('product&task=printcart',true),
				'hikashop_print_popup',
				760, 480, '', '', 'link'
			);
		?>
		</div>
	</div>
	<div class="clear_both"></div>
<?php
	}

	echo $this->notice_html;
	$row_count = 0;

	if($this->params->get('small_cart')) {
		$this->row = $this->total;
		if($this->params->get('show_cart_quantity', 1)) {
			$qty = 0;
			$group = $this->config->get('group_options', 0);
			foreach($this->rows as $i => $row) {
				if(empty($row->cart_product_quantity) && $this->cart_type == 'cart')
					continue;
				if($group && $row->cart_product_option_parent_id)
					continue;

				$qty += $row->cart_product_quantity;
			}

			if($qty == 1 && JText::_('X_ITEM_FOR_X') != 'X_ITEM_FOR_X') {
				$text = JText::sprintf('X_ITEM_FOR_X', $qty, $this->loadTemplate());
			} else {
				$text = JText::sprintf('X_ITEMS_FOR_X', $qty, $this->loadTemplate());
			}
		} else {
			$text = JText::sprintf('TOTAL_IN_CART_X', $this->loadTemplate());
		}

		if($this->cart_type == 'cart') {
?>
			<a class="hikashop_small_cart_checkout_link" href="<?php echo $this->url_checkout; ?>">
				<span class="hikashop_small_cart_total_title"><?php echo $text; ?></span>
			</a>
<?php
			if($this->params->get('show_cart_delete',1)) {
				$delete = hikashop_completeLink('product&task=cleancart');
				$delete .= (strpos($delete, '?') ? '&amp;' : '?');
?>
			<a class="hikashop_small_cart_clean_link" onclick="window.location='<?php echo $delete.'return_url='; ?>'+window.btoa(window.location); return false;" href="#" >
				<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="clean cart" />
			</a>
<?php
			}
			if($this->params->get('show_cart_proceed', 1) && $this->cart_type == 'cart' && $this->params->get('from','display') == 'module') {
				echo $this->cartHelper->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'checkout',$this->params,$this->url_checkout,'this.disabled=true; window.location=\''.$this->url_checkout.'\';return false;');
			}
		} else {
?>
			<a class="hikashop_small_cart_checkout_link" href="<?php echo hikashop_completeLink('cart&task=showcart&cart_id='.$this->element->cart_id.'&cart_type='.$this->cart_type.$this->cart_itemid); ?>">
				<span class="hikashop_small_cart_total_title"><?php echo $text; ?></span>
			</a>
<?php
		}
	} else {
		$form = 'hikashop_' . $this->cart_type . '_form';
?>
	<form action="<?php echo hikashop_completeLink('product&task=updatecart'.$this->url_itemid, false, true); ?>" method="post" name="<?php echo $form;?>">
		<table width="100%">
			<thead>
				<tr>
<?php
		if($this->params->get('image_in_cart', 0)) {
			$row_count++;
?>
					<th class="hikashop_cart_module_product_image_title hikashop_cart_title"><?php
						echo JText::_('CART_PRODUCT_IMAGE');
					?></th>
<?php
		}
		if($this->params->get('show_cart_product_name', 1)) {
		 	$row_count++;
?>
					<th class="hikashop_cart_module_product_name_title hikashop_cart_title"><?php
						echo JText::_('CART_PRODUCT_NAME');
					?></th>
<?php
		}
		if($this->params->get('show_cart_quantity', 1)) {
			$row_count++;
?>
					<th class="hikashop_cart_module_product_quantity_title hikashop_cart_title"><?php
						echo JText::_('CART_PRODUCT_QUANTITY');
					?></th>
<?php
		}
		if($this->params->get('show_price', 1)) {
			$row_count++;
?>
					<th class="hikashop_cart_module_product_price_title hikashop_cart_title"><?php
						echo JText::_('CART_PRODUCT_PRICE');
					?></th>
<?php
		}
		if($this->params->get('show_cart_delete', 1)) {
			$row_count++;
?>
					<th class="hikashop_cart_title"></th>
<?php
		}
		if($row_count < 1) {
?>
					<th></th>
<?php
		}
?>
				</tr>
			</thead>
<?php if($this->params->get('show_price', 1) && $this->cart_type == 'cart') { ?>
			<tfoot>
				<tr>
					<td colspan="<?php echo $row_count; ?>">
						<hr />
					</td>
				</tr>
<?php if($this->params->get('show_coupon', 0) && !empty($this->element->coupon)) { ?>
				<tr>
<?php
			switch($row_count) {
				case 0:
				case 1:
?>
					<td class="hikashop_cart_module_coupon_value"><?php
						if(!$this->params->get('price_with_tax'))
							echo $this->currencyClass->format(@$this->element->coupon->discount_value_without_tax * -1, @$this->element->coupon->discount_currency_id);
						else
							echo $this->currencyClass->format(@$this->element->coupon->discount_value * -1, @$this->element->coupon->discount_currency_id);
					?></td>
<?php
					break;

				default:
					$colspan = $row_count - 1;
					if($this->params->get('show_cart_delete', 1))
						$colspan--;

					if($colspan > 0) {
?>
					<td class="hikashop_cart_module_coupon_title" colspan="<?php echo $colspan; ?>">
						<?php echo JText::_('HIKASHOP_COUPON'); ?>
					</td>
<?php
					}
?>
					<td class="hikashop_cart_module_coupon_value"><?php
						if(!$this->params->get('price_with_tax'))
							echo $this->currencyClass->format(@$this->element->coupon->discount_value_without_tax * -1, @$this->element->coupon->discount_currency_id);
						else
							echo $this->currencyClass->format(@$this->element->coupon->discount_value * -1, @$this->element->coupon->discount_currency_id);
					?></td>
<?php
					if($this->params->get('show_cart_delete', 1)) {
?>
					<td></td>
<?php
					}
					break;
			}
?>
				</tr>
<?php } ?>
<?php
		if($this->params->get('show_shipping', 0) && !empty($this->element->shipping)) {
			$shipping_price = null;
			foreach($this->element->shipping as $shipping) {
				if(!isset($shipping->shipping_price) && isset($shipping->shipping_price_with_tax) ) {
					$shipping->shipping_price = $shipping->shipping_price_with_tax;
				}
				if(isset($shipping->shipping_price)) {
					if($shipping_price === null)
						$shipping_price = 0.0;
					if(!$this->params->get('price_with_tax') || !isset($shipping->shipping_price_with_tax)) {
						$shipping_price += $shipping->shipping_price;
					} else {
						$shipping_price += $shipping->shipping_price_with_tax;
					}
				}
			}
			if($shipping_price !== null) {
				$shipping_price = $this->currencyClass->format($shipping_price, $this->total->prices[0]->price_currency_id);
			}
			if($shipping_price) {
?>
				<tr>
<?php
				switch($row_count) {
					case 0:
					case 1:
?>
					<td class="hikashop_cart_module_shipping_value"><?php
						echo $shipping_price;
					?></td>
<?php
						break;

					default:
						$colspan = $row_count - 1;
						if($this->params->get('show_cart_delete', 1))
							$colspan--;
						if($colspan > 0) {
?>
					<td class="hikashop_cart_module_shipping_title" colspan="<?php echo $colspan; ?>"><?php
						echo JText::_('HIKASHOP_SHIPPING');
					?></td>
<?php
						}
?>
					<td class="hikashop_cart_module_shipping_value"><?php
						echo $shipping_price;
					?></td>
<?php
						if($this->params->get('show_cart_delete', 1)) {
?>
					<td>
					</td>
<?php
						}
						break;
				}
?>
				</tr>
<?php
			}
		}
?>
				<tr>
<?php
		switch($row_count) {
			case 0:
			case 1:
?>
					<td class="hikashop_cart_module_product_total_value"><?php
						$this->row = $this->total;
						echo $this->loadTemplate();
					?></td>
<?php
				break;

			default:
				$colspan = $row_count - 1;
				if($this->params->get('show_cart_delete', 1))
					$colspan--;

				if($colspan > 0) {
?>
					<td class="hikashop_cart_module_product_total_title" colspan="<?php echo $colspan; ?>"><?php
						echo JText::_('HIKASHOP_TOTAL');
					?></td>
<?php
				}
?>
					<td class="hikashop_cart_module_product_total_value"><?php
						$this->row = $this->total;
						echo $this->loadTemplate();
					?></td>
<?php
				if($this->params->get('show_cart_delete', 1)) {
?>
					<td>
					</td>
<?php
				}
				break;
		}
?>
				</tr>
			</tfoot>
<?php } ?>
			<tbody>
<?php
	// Init that variable before the listing
	$this->cart_product_price = true;

	// Get settings from the config
	$group = $this->config->get('group_options',0);
	$defaultParams = $this->config->get('default_params');

	$image_height = $this->config->get('thumbnail_y');
	$image_width = $this->config->get('thumbnail_x');
	$image_options = array(
		'default' => true,
		'forcesize' => $this->config->get('image_force_size',true),
		'scale' => $this->config->get('image_scale_mode','inside')
	);

	$k = 0;
	foreach($this->rows as $i => $row) {
		if(empty($row->cart_product_quantity) || @$row->hide == 1)
			continue;
		if($group && $row->cart_product_option_parent_id)
			continue;

		$this->productClass->addAlias($row);
		$input = '';
?>
				<tr class="row<?php echo $k; ?>">
<?php
		if(@$this->params->get('image_in_cart')) {
?>
					<td class="hikashop_cart_module_product_image hikashop_cart_value" style="vertical-align:middle !important; text-align:center;">
<?php
			$img = $this->image->getThumbnail(@$row->images[0]->file_path, array('width' => $image_width, 'height' => $image_height), $image_options);
			if($img->success)
				echo '<img class="hikashop_product_cart_image" title="'.$this->escape(@$row->images[0]->file_description).'" alt="'.$this->escape(@$row->images[0]->file_name).'" src="'.$img->url.'"/>';
?>
					</td>
<?php
		}

		if($this->params->get('show_cart_product_name', 1)) {
?>
					<td class="hikashop_cart_module_product_name_value hikashop_cart_value">
						<?php if(@$defaultParams['link_to_product_page']) { ?> <a href="<?php echo hikashop_contentLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$this->url_itemid, $row);?>" ><?php } ?>
						<?php echo $row->product_name; ?>
						<?php if ($this->config->get('show_code')) { ?><span class="hikashop_product_code_cart"><?php echo $row->product_code; ?></span><?php } ?>
						<?php if(@$defaultParams['link_to_product_page']) { ?></a><?php } ?>
<?php
			ob_start();
			if(hikashop_level(2) && !empty($this->itemFields)) {
				foreach($this->itemFields as $field) {
					$namekey = $field->field_namekey;
					if(!empty($row->$namekey) && strlen($row->$namekey)) {
						echo '<p class="hikashop_cart_item_'.$namekey.'">' .
							$this->fieldsClass->getFieldName($field) . ': ' .
							$this->fieldsClass->show($field, $row->$namekey) .
							'</p>';
					}
				}
			}
			if($group) {
				foreach($this->rows as $j => $optionElement) {
					if($optionElement->cart_product_option_parent_id != $row->cart_product_id)
						continue;
					if(empty($optionElement->variant_name)){
						if(empty($optionElement->characteristics_text)){
							$text = $optionElement->product_name;
						}else{
							$text = $optionElement->characteristics_text;
						}
					}else{
						$text = $optionElement->variant_name;
					}
					echo '<p class="hikashop_cart_option_name">'. $text.'</p>';
					$input .='document.getElementById(\'cart_product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
					echo '<input type="hidden" id="cart_product_option_'.$optionElement->cart_product_id.'" name="item['.$optionElement->cart_product_id.'][cart_product_quantity]" value="'.$row->cart_product_quantity.'"/>';
				}
			}

			$html = ob_get_clean();
			if(!empty($html)) {
				echo '<p class="hikashop_cart_product_custom_item_fields">'.$html.'</p>';
			}
?>
					</td>
<?php
		}

		if($group) {
			foreach($this->rows as $j => $optionElement) {
				if($optionElement->cart_product_option_parent_id != $row->cart_product_id)
					continue;
				if(empty($optionElement->prices[0]))
					continue;
				if(!isset($row->prices[0])) {
					$row->prices[0]->price_value = 0;
					$row->prices[0]->price_value_with_tax = 0;
					$row->prices[0]->price_currency_id = hikashop_getCurrency();
				}
				foreach(get_object_vars($row->prices[0]) as $key => $value) {
					if(strpos($key, 'price_value') === false)
						continue;
					if(is_object($value)) {
						foreach(get_object_vars($value) as $key2 => $var2) {
							// if(strpos($key2,'price_value')!==false)
							$row->prices[0]->$key->$key2 += @$optionElement->prices[0]->$key->$key2;
						}
					} else {
						$row->prices[0]->$key += @$optionElement->prices[0]->$key;
					}
				}
			}
		}

		if($this->params->get('show_cart_quantity', 1)) {
?>
					<td class="hikashop_cart_module_product_quantity_value hikashop_cart_value">
<?php
			if(empty($session))
				$session = new stdClass();
			$session->cart_id = $this->app->getUserState( HIKASHOP_COMPONENT.'.'.$this->cart_type.'_id', 0, 'int' );

			if($row->product_parent_id != 0 && isset($row->main_product_quantity_layout))
				$row->product_quantity_layout = $row->main_product_quantity_layout;
// TODO - WTF
			if($this->element->cart_id == $session->cart_id && $this->params->get('from','display') != 'module') {
				if($row->product_quantity_layout == 'show_select' || (empty($this->row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select')) {
					$min_quantity = $row->product_min_per_order;
					$max_quantity = $row->product_max_per_order;
					if($min_quantity == 0)
						$min_quantity = 1;
					if($max_quantity == 0)
						$max_quantity = (int)$min_quantity * 15;
// TODO : CLEAN
?>
						<select id="hikashop_wishlist_quantity_select_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" onchange="var qty_field = document.getElementById('hikashop_wishlist_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>'); qty_field.value = this.value; if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;">
<?php
							for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity) {
								$selected = '';
								if($j == $row->cart_product_quantity)
									$selected = 'selected="selected"';
								echo '<option value="'.$j.'" '.$selected.'>'.$j.'</option>';
							}
?>
						</select>
						<input id="hikashop_wishlist_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" type="hidden" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" value="<?php echo $row->cart_product_quantity; ?>"/>
<?php
				}elseif($row->product_quantity_layout == 'show_select_price' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select_price')){
?>
					<select id="hikashop_cart_quantity_select_<?php echo $i; ?>">
<?php
						$pricesSet = array();
						foreach($row->prices as $price){
							if($price->price_min_quantity == 0)
								$price->price_min_quantity = 1;
							if(in_array($price->price_min_quantity, $pricesSet) || $price->price_min_quantity < $min_quantity)
								continue;
							$pricesSet[] = $price->price_min_quantity;
							echo '<option value="'.$price->price_min_quantity.'">'.$price->price_min_quantity.'</option>';
						}
						if(empty($pricesSet)){
							for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
								echo '<option value="'.$j.'">'.$j.'</option>';
							}
						}
?>
					</select>
<?php
				} else {
?>
						<input id="hikashop_wishlist_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_wishlist_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
<?php
				}
?>

						<div class="hikashop_cart_product_quantity_refresh">
							<a href="#" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field && qty_field.value != '<?php echo $row->cart_product_quantity; ?>'){<?php echo $input; ?> qty_field.form.submit(); } return false;" title="<?php echo JText::_('HIKA_REFRESH'); ?>">
								<img src="<?php echo HIKASHOP_IMAGES . 'refresh.png';?>" border="0" alt="<?php echo JText::_('HIKA_REFRESH'); ?>" />
							</a>
						</div>
<?php
			} else {
				if($row->product_quantity_layout == 'show_select' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select')) {
					$min_quantity = $row->product_min_per_order;
					$max_quantity = $row->product_max_per_order;
					if($min_quantity == 0)
						$min_quantity = 1;
					if($max_quantity == 0)
						$max_quantity = (int)$min_quantity * 15;
// TODO : CLEAN
?>
						<select id="hikashop_cart_quantity_select_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" class="tochosen" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>'); qty_field.value = this.value; if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;">
<?php
							for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
								$selected = '';
								if($j == $row->cart_product_quantity)
									$selected = 'selected="selected"';
								echo '<option value="'.$j.'" '.$selected.'>'.$j.'</option>';
							}
?>
						</select>
						<input id="hikashop_cart_quantity_<?php echo $this->params->get('id','0').'_'.$row->cart_product_id;?>" type="hidden" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" value="<?php echo $row->cart_product_quantity; ?>" />
<?php
					}elseif($row->product_quantity_layout == 'show_select_price' || (empty($row->product_quantity_layout) && $this->config->get('product_quantity_display', 'show_default') == 'show_select_price')){
?>
						<select id="hikashop_cart_quantity_select_<?php echo $i; ?>">
<?php
							$pricesSet = array();
							foreach($row->prices as $price){
								if($price->price_min_quantity == 0)
									$price->price_min_quantity = 1;
								if(in_array($price->price_min_quantity, $pricesSet) || $price->price_min_quantity < $min_quantity)
									continue;
								$pricesSet[] = $price->price_min_quantity;
								echo '<option value="'.$price->price_min_quantity.'">'.$price->price_min_quantity.'</option>';
							}
							if(empty($pricesSet)){
								for($j = $min_quantity; $j <= $max_quantity; $j += $min_quantity){
									echo '<option value="'.$j.'">'.$j.'</option>';
								}
							}
?>
						</select>
<?php
					}else{
?>
						<input id="hikashop_cart_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
<?php
					}
				}

				if($this->params->get('show_delete',1) && $this->params->get('from','display') != 'module'){
?>
						<div class="hikashop_cart_product_quantity_delete">
							<a href="<?php echo hikashop_completeLink('product&task=updatecart&product_id='.$row->product_id.$this->url_itemid.'&quantity=0&return_url='.urlencode(base64_encode(hikashop_currentURL('return_url')))); ?>" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0; <?php echo $input; ?> qty_field.form.submit();} return false;" title="<?php echo JText::_('HIKA_DELETE'); ?>">
								<img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" />
							</a>
						</div>
<?php
				}
?>
					</td>
<?php
			}

			if($this->params->get('show_price', 1)) {
?>
					<td class="hikashop_cart_module_product_price_value hikashop_cart_value"><?php
						$this->row=&$row;
						$this->unit=false;
						echo $this->loadTemplate();
					?></td>
<?php
			}

			if($this->params->get('show_cart_delete', 1)) {
?>
					<td class="hikashop_cart_module_product_delete_value hikashop_cart_value">
						<a href="<?php echo hikashop_completeLink('product&task=updatecart&cart_type='.$this->cart_type.'&cart_product_id='.$row->cart_product_id.'&quantity=0&return_url='.urlencode(base64_encode(urldecode($this->params->get('url'))))); ?>" onclick="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if(qty_field){qty_field.value=0;<?php echo $input; ?> document.hikashop_cart_form.submit(); return false;}else{ return true;}"  title="<?php echo JText::_('HIKA_DELETE'); ?>"><img src="<?php echo HIKASHOP_IMAGES . 'delete2.png';?>" border="0" alt="<?php echo JText::_('HIKA_DELETE'); ?>" /></a>
					</td>
<?php
			}

			if($this->cart_type == 'wishlist' && $this->params->get('from','display') != 'module') {
?>
					<td class="hikashop_wishlist_display_add_to_cart">
						<!-- Add 'ADD_TO_CART' button -->
<?php
				$form = ',\'hikashop_wishlist_form\'';

				$this->ajax = '
if(qty_field == null) {
	var qty_field = document.getElementById(\'hikashop_wishlist_quantity_'.$row->cart_product_id.'\').value;
}
if(hikashopCheckChangeForm(\'item\',\'hikashop_wishlist_form\'))
	return hikashopModifyQuantity(\'' . $this->row->product_id . '\',qty_field,1,\'hikashop_wishlist_form\',\'cart\');
return false;
';

				$this->setLayout('quantity');
				echo $this->loadTemplate();
				$this->setLayout('listing_price');
?>
					</td>
<?php
			}

			if($row_count < 1) {
?>
					<td></td>
<?php
			}
?>
				</tr>
<?php
			$k = 1 - $k;
		}
		$this->cart_product_price = false;
?>
			</tbody>
		</table>
<?php
		if($this->params->get('show_cart_quantity', 1)) {
?>
		<noscript>
			<input type="submit" class="btn button" name="refresh" value="<?php echo JText::_('REFRESH_CART');?>"/>
		</noscript>
<?php
		}
		if($this->cart_type == 'cart' && $this->params->get('from', 'display') == 'module') {
			if($this->params->get('show_cart_proceed', 1))
				echo $this->cartHelper->displayButton(JText::_('PROCEED_TO_CHECKOUT'), 'checkout', $this->params, $this->url_checkout, 'this.disabled = true;window.location.href = \''.$this->url_checkout.'\';return false;');
		} else {
?>
		<div class="hikashop_display_cart_show_convert_button">
<?php
			if($this->params->get('from', 'display') != 'module') {
				echo $this->cartHelper->displayButton($convertText, 'wishlist', $this->params, hikashop_completeLink('cart&task=convert' . $this->url_itemid . '&cart_type='.$this->cart_type), 'window.location.href = \''.hikashop_completeLink('cart&task=convert'.$this->url_itemid . '&cart_type='.$this->cart_type).'\';return false;');
			} else {
				echo $this->cartHelper->displayButton($displayText, 'wishlist', $this->params, hikashop_completeLink('cart&task=showcart&cart_id=' . $this->element->cart_id . $this->cart_itemid . '&cart_type='.$this->cart_type), 'window.location.href = \''.hikashop_completeLink('cart&task=showcart&cart_id='.$this->element->cart_id . $this->cart_itemid . '&cart_type='.$this->cart_type).'\';return false;');
			}
?>
		</div>
<?php
		}
?>
		<input type="hidden" name="url" value="<?php echo $this->params->get('url');?>"/>
		<input type="hidden" name="ctrl" value="product"/>
		<input type="hidden" name="cart_type" value="<?php echo $this->cart_type; ?>"/>
		<input type="hidden" name="task" value="updatecart"/>
	</form>
<?php } ?>
</div>
<div class="clear_both"></div>
<?php
if(JRequest::getWord('tmpl', '') == 'component') {
	if(!headers_sent()) {
		header('Content-Type: text/css; charset=utf-8');
	}
	exit;
} else {
	$module_id = (int)$this->params->get('id', 0);
}

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

Time to create page: 0.150 seconds
Powered by Kunena Forum