Put in a Continue Shopping Button on Detail Page

  • Posts: 103
  • Thank you received: 0
11 years 6 months ago #72203

Hi Gurus,

How hard is it to add new buttons? I'd like to add a Continue Shopping Button to the Detailed Products Page.

Cheers,
Susan

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

  • Posts: 2334
  • Thank you received: 403
11 years 6 months ago #72228

Hi there,

You can do this by adding the following line in /component/com_hikashop/views/product/tmpl/quantity.php just before the final </div>:

<form><input type="button" class="btn button hikashop_cart_input_button" name="return" value="Continue Shopping" OnClick="window.location.href='www.thelinkyouwant.com'"/></form>

Last edit: 11 years 6 months ago by Eliot.

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

  • Posts: 103
  • Thank you received: 0
11 years 6 months ago #72247

Hi Eliot,

Thanks, will give it a go.

Just curious.. where do YOU edit the php files? Do you go thru the file manager on hosting server? Or is there a special place inside the hikashop?

Thanks again, big help!

Susan

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

  • Posts: 2334
  • Thank you received: 403
11 years 6 months ago #72250

You can do it trought the Hikashop interface in Display>Views.
Then type "quantity", choose the right file depending of your template and you'll be able to add the given code :)

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

  • Posts: 103
  • Thank you received: 0
11 years 6 months ago #72256

Brilliant! I put it before the final div (hey I got a BUTTON YAY) but it also puts the button on the main product listing page, in each product box under the thumbnail (not just the detail page) and when I read the code, it has lots of waitlist, no stock etc options, but nothing that sounds like it pertains, in particular, to the detail product listing page. Wrong page?

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

  • Posts: 2334
  • Thank you received: 403
11 years 6 months ago #72257

My bad, I didn't think about this.
Well, the solution is to delete the line in the quantity file and add it in show_default like this:

<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();
		?>
		<form><input type="button" class="btn button hikashop_cart_input_button" name="return" value="Return" OnClick="window.location.href='http://localhost'"/></form>
</div>

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

Time to create page: 0.077 seconds
Powered by Kunena Forum