- Posts: 24
- Thank you received: 0
Add To Cart Extra Ajax Link on Product Detail Page
14 years 10 months ago #29293
by axyswebs
Add To Cart Extra Ajax Link on Product Detail Page was created by axyswebs
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.
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.
Please Log in or Create an account to join the conversation.
14 years 10 months ago #29318
by nicolas
Replied by nicolas on topic Re: Add To Cart Extra Ajax Link on Product Detail Page
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();
?>
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.
14 years 10 months ago #29328
by axyswebs
Replied by axyswebs on topic Re: Add To Cart Extra Ajax Link on Product Detail Page
Excellent thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.155 seconds