Jump to content

Adding "Buy" buttons to Latest Products


Guest

Recommended Posts

Hey There,

Is there any way to edit /content/index.tpl to get the latest products to have a "Buy" or "Add to Cart" button next to the price?

Thanks

Zach

Link to comment
Share on other sites

Guest fandango

Edit '/skins/your_skin/styleTemplates/content/index.tpl'

Look for:

CODE

</div>

<!-- END: repeat_prods -->

And paste this just before:

CODE

<form action="index.php" method="post" name="prod{VAL_PRODUCT_ID}">

<input type="hidden" name="add" value="{VAL_PRODUCT_ID}" />

<input type="hidden" name="quan" value="1" /><a href="java script:submitDoc('prod{VAL_PRODUCT_ID}');" target="_self" class="txtButton">Buy</a> <a href="index.php?act=viewProd&amp;productId={VAL_PRODUCT_ID}" target="_self" class="txtButton">More</a></form>

NOTE: You will need to rename the 'java script' to 'javascript' (take out the space).

There are two restrictions with this method of adding it:

1. It does not use the language file for button names.

2. It assumes that the products are in stock, ie there is no stock control element to the 'buy' button appearing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...