Add To Cart Extra Ajax Link on Product Detail Page

  • Posts: 24
  • Thank you received: 0
14 years 6 months ago #29293

Hi

I am not a programmer but thought I would be able to do this task :(

I am trying to add a second ajax add to cart link in the show.php template but cannot find the right code to use.

I am currently using this code, in the attached file, in my product listings templates which works fine there but it doesn't work in the product details page.

Thanks!

This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

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

  • Posts: 85581
  • Thank you received: 14004
  • MODERATOR
14 years 6 months ago #29318

Hi,

On the product page, you should use that code:
<?php
$this->row =& $this->element;
$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\''.$this->row->product_id.'\',field,1'.$form.'); } else { return false; }';
$this->setLayout('quantity');
echo $this->loadTemplate();
?>

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

  • Posts: 24
  • Thank you received: 0
14 years 6 months ago #29328

Excellent thank you!

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

Time to create page: 0.058 seconds
Powered by Kunena Forum