Announcement

Collapse
No announcement yet.

Is there a way to quickly count the number of products in my store?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a way to quickly count the number of products in my store?

    Hi,

    Just wondered if there's a way to quickly count the number of products in my store? Like doing a word count in Word, only products in Actinic.

    Thanks

    #2
    I think this was in Teclan's most recent newsletter - here's the link

    http://www.teclan.co.uk/software/Act...ductCount.html

    Comment


      #3
      You can also stick this snippet of HTML into a layout and it will display the number of products, duplicates and fragments on the generated page.
      Code:
      <actinic:block php="true">$prodcount=0;$dupcount=0;$fragcount=0;</actinic:block>
      <actinic:block type="EntireSectionList">
        <actinic:block type="ProductList">
          <actinic:block php="true">
            $prodtype = <actinic:variable name="ProductType" />;
            if ( $prodtype == 0 ) $prodcount++;
            if ( $prodtype == 1 ) $dupcount++;
            if ( $prodtype == 2 ) $fragcount++;
          </actinic:block>
        </actinic:block>
      </actinic:block>
      <actinic:block php="true">echo "Products: $prodcount, Duplicates: $dupcount, Fragments: $fragcount";</actinic:block>
      It loops through the entire site, so don't put it on every page as it will slow Actinic down. You could put a BlockIf around it so it only displays on the store top for example.

      You can also put it into a product or fragment description, between !!< and >!! so Actinic knows that it's code.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Magic! Thanks very much

        Comment

        Working...
        X