Skip to main content

Changin Add to Cart Button Position

More
12 years 8 months ago #140318 by condorazul
-- url of the page with the problem -- : www.lacestamagica.com
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2.1

I would like to change the add to cart button position in my show_tabular view
reading in the forum i copy/paste the following code:
<?php if(empty ($this->element->characteristics) || $this->params->get('characteristic_display')!='list'){ ?>
<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>

and paste it just after:
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
<?php
if ($this->params->get('show_price')) {
$this->row = & $this->element;
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
?>
</span>

It does not work at all, the result is broken template and not going to checkout.

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

More
12 years 8 months ago #140323 by Mohamed Thelji
Hi,
Firstly can you show me how do you want to move your add to cart button through some screenshots ? so that I can give you some advice about how you should edit your "show_tabular" file.

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

More
12 years 8 months ago #140327 by condorazul
sure, here they are, first one as it is, second one as i would like it



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

More
12 years 8 months ago #140367 by nicolas
For what you want to do, I would have given exactly the same modification advice.
So all I can think of is that you made a mistake when doing it.
Can you try again ?
What error do you get exactly ?
What is the resulting code exactly ? could you attach the file content in your message so that we can see your modification?

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

More
12 years 8 months ago - 12 years 8 months ago #140387 by condorazul
Take a look at www.lacestamagica.cl in any product, if you click on the button it breaks the template like whe i have the cart in ajax.
i also uploaded the file

This attachment is hidden for guests.
Please log in or register to see it.
Last edit: 12 years 8 months ago by condorazul.

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

More
12 years 8 months ago #140394 by nicolas
That's apparently because you have activated the option "Use AJAX when possible for add to cart buttons" of the configuration. Turn it back off as it is by default and it will work fine.

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

More
12 years 8 months ago - 12 years 8 months ago #140396 by condorazul
it´s turned off
Last edit: 12 years 8 months ago by condorazul.

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

More
12 years 8 months ago #140401 by nicolas
Ok, then before that code add the code:
Code:
<?php $this->formName = $form = ',0'; ?>
and that will force the AJAX mode off because with the modification you have, it is the AJAX mode which is currently used by the add to cart button.

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

More
12 years 8 months ago #140432 by condorazul
did not work either

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

More
12 years 8 months ago #140440 by nicolas
Try instead:
<?php $this->formName = $form = ',\'hikashop_product_form\''; ?>

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

More
12 years 8 months ago #140446 by condorazul
Now it works!!!
Why does ajax not work in my template???

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

More
12 years 8 months ago #140449 by nicolas
It cannot work when you have options on the products.

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

More
12 years 8 months ago - 12 years 8 months ago #140459 by condorazul
I realised i have another problem, hikashop_product_price_with_options_main its not showing anything, the price is not displayed and not generated
Last edit: 12 years 8 months ago by condorazul.

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

More
12 years 8 months ago #140477 by nicolas
It might be a problem with the chosen library. Turn it off in the Display tab of the configuration and that might help.
The following user(s) said Thank You: condorazul

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

More
12 years 8 months ago #140508 by condorazul
It Worked!!!! Thanks!

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

Time to create page: 0.269 seconds
Powered by Kunena Forum