change position of add to cart button

  • Posts: 79
  • Thank you received: 1
11 years 11 months ago #79257

Hi,
I would like to change the position of my add to cart button.
But whre do I do that. Is it just css or have I do it in php view.
If it is a php issue it would be nice to have a little hint for help



Happy to get help
greetings georg

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #79268

Hi,

You will have to edit the view "product / show_default" to move the button part in the right part.

Else I think that it can be done too in CSS, you can find some documentation here:
www.hikashop.com/en/support/documentation/faq.html#css

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #79657

Xavier wrote: Hi,

You will have to edit the view "product / show_default" to move the button part in the right part.

:(
Hi Xavier, how to i do dis?

Last edit: 11 years 11 months ago by Jerome.

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

  • Posts: 79
  • Thank you received: 1
11 years 11 months ago #79682

Hi Xavier
thank´s for the hint. I know the view section but I´m not in to php and haven´t realy got an idea what to change, even wher to look after. Is there any kind of documentation that I can understand and learn how to change those things?

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

  • Posts: 79
  • Thank you received: 1
11 years 11 months ago #79684

Hi in case if you didn´t find the view. Here a picture from hikashop backend. But I guess you have the same issue than me not to know how to change this file

Attachments:
The following user(s) said Thank You: djundi

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #79685

Georg wrote: Hi in case if you didn´t find the view. Here a picture from hikashop backend. But I guess you have the same issue than me not to know how to change this file

Thanks, but i can't find "button part" in this php script :) :(

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 11 months ago #79693

Hi,

With links, we could give you more information.
The add to cart button is not display directly in the "show_default" view, it uses another template named "quantity".

	<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
		<?php
		$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>
This is this block that you have to move if you want to move the "add to cart" button in the page.

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: djundi

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #79769

Hi again, Jerome :)
Thanks for the answer, i have another question, this time i want to move "add to cart" button and quantity filed to the right part but on the product page

Attachments:

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 11 months ago #79831

That should already be the case actually. It must be a CSS issue. If you could give a link to that page, we could check your website CSS and tell you more.

The following user(s) said Thank You: djundi

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #79897

Great thanks for the answer, but i did it on my own :)
my another question is, how to make border around quantity field and button "add to cart"
Something like this :)


......this is just photo collage, how to make real :)

Attachments:
Last edit: 11 years 11 months ago by djundi.

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 11 months ago #79965

You can add for example that CSS on your website:
#hikashop_product_quantity_main
{
border: 1px solid black;
padding: 5px;
border-radius: 15px;
}

The following user(s) said Thank You: djundi

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #80025

Thanks Nicolas, work stay perfect ! :)

Last edit: 11 years 11 months ago by djundi. Reason: Aword mistake

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #80030

And again me.....
Have way to move products options, for example: " + Win 7", or another
in product characteristic fields ? and consumer make chose in options

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #80062

Hi,

You have to edit the view "product / show_default" and move the part:

	if (hikashop_level(1) && !empty ($this->element->options)) {
	?>
		<div id="hikashop_product_options" class="hikashop_product_options">
			<?php
			//LAYOUT option
			$this->setLayout('option');
			echo $this->loadTemplate();
			?>
		</div>
		<br />
		<?php
		$form = ',\'hikashop_product_form\'';
		if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
		?>
			<input type="hidden" name="popup" value="1"/>
		<?php
		}
	}
Under the part:
	if(!empty($this->fields)){
		//LAYOUT show_block_custom_main
		$this->setLayout('show_block_custom_main');
		echo $this->loadTemplate();
	}

The following user(s) said Thank You: djundi

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

  • Posts: 45
  • Thank you received: 1
11 years 11 months ago #80068

Thanks Xavier,
Is done fine :)

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

Time to create page: 0.086 seconds
Powered by Kunena Forum