php - Magento - How to add extra button like "Add to cart" and Redirect to external url from grid view, list view and product page view. -


i want add button "add cart" example "live demo". then, no of products each 1 have unique demo link add "manage attributes" section of admin. want redirect "live demo" button particular product page demo url , after should button @ header section "buy now".

currently have added button in product page.
how can on grid view , list view.

enter image description here

by making changes in /var/www/magentodemo/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml

<button type="button" title="<?php echo $demo ?>" class="button btn-cart" onclick="productaddtocartform.submit(this)"><span><span><?php echo $demo ?></span></span></button> 

but class name , onclick function should call button redirect external url (to call external url attribute.)

anyone have done before. please let me know thoughts.

thanks in advance.

first of of need make new attribute used in

product listing under manage attributes

and after can make use of new attribute in grid pages in list.phtml file of current theme calling new attribute other can see in file name etc.

thanks , let me know if have issues


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -