Jump to content

[Resolved] Featured Product


BWG

Recommended Posts

You can hard code it in rather than have it auto generated.

If you view source code you will see the html for the featured product between these opening and closing div tags.

<div class="panel" id="box-featured">
   <h3>Featured Product</h3>
product code in here
   </div>

Copy the code into the templates/box.featured.php file and change the code to the product you wish to feature replacing everything below the *}

Link to comment
Share on other sites

Here is the code from templates/featured.php, not sure where to put your code....

<div id="featured_product">
  <form action="{$VAL_SELF}" method="post" class="top addForm" enctype="application/x-www-form-urlencoded">
    <h3>{$LANG.catalogue.title_feature}</h3>
    <p class="image">
      <a href="{$featured.url}" title="{$featured.name}">
        <img src="{$featured.image}" alt="{$featured.name}" />
      </a>
    </p>
    <p class="title"><a href="{$featured.url}" title="{$featured.name}">{$featured.name}</a></p>
      {if $featured.ctrl_sale}
      <p class="price"><span class="price_previous">{$featured.price}</span> <span class="price_sale">{$featured.sale_price}</span></p>
      {else}
      <p class="price">{$featured.price}</p>
      {/if}
      {if $featured.ctrl_purchase && !$CATALOGUE_MODE}
        <div class="button">
          <input type="hidden" name="add[{$featured.product_id}][quantity]" value="1" />
          <input type="submit" class="button_add_basket" value="{$LANG.catalogue.buy_now}" />
        </div>
        {/if}
  </form>
</div>

Link to comment
Share on other sites

Replace all of that. Depending on how many products you have if you reload your page you may see the product you want as a featured product. View source then copy the code for your product. If you have a lot of products then amend the product code to the one you want.

Your code may be slightly different depending on what skin you are using but the principle is the same.

 

Link to comment
Share on other sites

  • 3 weeks later...

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...