Jump to content

How to create a "Features" specific page?


noesac

Recommended Posts

Say I have a feature called "Leather", I want to create a category page that displays only products with the feature = "Leather".

 

I'm thinking it would be a combination of the existing product-list.tpl code, with the code from the following link:

 

http://www.prestasho...__1#entry598960

 

So I tried this but no luck:

 

Changing from:

 

{if isset($products)}
<!-- Products list -->
<ul id="product_list" class="clear">
{foreach from=$products item=product name=products}

...etc

 

To:

 

$features = self::getFrontFeatures($id_lang);
$featureValue = null;

foreach ($features as $feature)
   if ($feature['Style'] == 'Leather')
       $featureValue = $feature['value'];

{if isset($products)}
<!-- Products list -->
<ul id="product_list" class="clear">
{foreach from=$products item=product name=products}

...etc

 

Any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...