Move Product Price Near Add To Cart Button

  • Posts: 29
  • Thank you received: 0
11 years 8 months ago #126347

-- url of the page with the problem -- :http://www.homeangelz.co.uk/draft2013/index.php/bookings/book-services
-- HikaShop version -- : 2.2.2
-- Joomla version -- :3.1.5
-- PHP version -- : 5.4.20

Hello,

  1. I have been asked if (on all product pages) I can move the Price near to the Add To Cart button. Can you show me how to do this please? I think I have to edit the listing_price.php file in the views area of Hika Shop but I know VERY LITTLE about php so could you please show me what I would need to move/edit? Below is the code from listing_price. Hopefully this is the correct code to be edited.
  2. (I have solved this now, I think. With Shipping Methods
    Could you also tell me, is it possible to set a minimum price amount for a product? My client has a product with options here: www.homeangelz.co.uk/draft2013/index.php...ing-70-minimum-spend and she wants the minimum amount for buyers to spend to be £70. If you could show me a way to do this I will be very grateful but if now, I understand because it sounds impossible to me.)

Many thanks,
Monica.

Last edit: 11 years 8 months ago by Jerome.

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

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
11 years 8 months ago #126474

Hi,

1 - I am sorry, the view "listing_price" wasn't the good file.
Please do not post complete files of HikaShop. Don't worry, we already have them :)

The view that you want to override/customize is the view "product | show_default".
The price is displaying using:

	<span id="hikashop_product_price_main" class="hikashop_product_price_main">
		<?php
		//LAYOUT listing_price
		if ($this->params->get('show_price')) {
			$this->row = & $this->element;
			$this->setLayout('listing_price');
			echo $this->loadTemplate();
		}
		?>
	</span>
And the add to cart is with the quantity:
	if(empty ($this->element->characteristics) || $this->params->get('characteristic_display')!='list'){ ?>
		<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
			<?php
			//LAYOUT quantity
			$this->row = & $this->element;
			$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
			$this->setLayout('quantity');
			echo $this->loadTemplate();
			?>
		</div>
	<?php }
While moving these blocks be careful with the PHP tags, you might need to open/close some.
If you made any kind of error while modifying the view, don't worry. You can simply delete your override in the backend (using the trash icon) and the original view will be restored.

2 - You're right, you can use the minimum price option of the shipping methods in order to create a minimum price restriction.

Kind regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: missmonica

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

  • Posts: 29
  • Thank you received: 0
11 years 8 months ago #127379

Hi Jerome,

Thank you so much! I was able to do exactly what I needed thanks to the information you provided :)

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

Time to create page: 0.057 seconds
Powered by Kunena Forum