Display Product Info Based on Product Tags

Another quick modification/tutorial on the LightSpeed Web Store.  Say you want to display custom information on a seelct group of product pages without having to manually enter that information on every product.  No problem, let's just utilize the LightSpeed tags.  What we will first do is assign the same tag to every product where we want this information to show up.  For this example we are going to place the word "cndesign" in one of the three tag locations in the product card (under Web).

Done? Great!

Now, go find the following file under your LightSpeed Web Store template, ../themes/yourthemename/views/product/index.php

Find a good spot to display this custom information within the above listed file and insert the following snippet of code:

<?php $tags = CHtml::listData($model->productTags,'tag.tag','tag.tag'); ?>
                    <?php if (in_array("cndesign", $tags, TRUE))
                      {
  echo "whatever you want to display.  This could be shipping information, images, sale information, etc.";
  }
?>

We hope this helps with your LightSpeed customizations.  If you have any questions, please contact us!
  • 12 Users Found This Useful
Was this answer helpful?

Related Articles

LightSpeed Pro or LightSpeed Cloud? Compare!

You're set on going with LightSpeed Retail for your Point of Sale system, congrats on making that...

LightSpeed Web Store - Order Downloader Failed to Complete

So you've got your LightSpeed web store all setup and then BAM the order downloader won't...

Make Products Disappear From Search Results, Direct Link Still Works

SEO (Search Engine Optimization) should be a major concern for anybody starting a new e-commerce...

Powered by WHMCompleteSolution