Announcement

Collapse
No announcement yet.

Using the CIN Function

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

    Using the CIN Function

    OK so I'm going nuts trying to get this to work.

    I have a loop of Sub-Products. The &mvt:sub_product:code; displays fine, but the CIN function is not picking up when the sub Product Code contains the text "Marmot".

    I can't figure it out. Any help welcomed!

    Code:
    <mvt:foreach iterator="sub_product" array="sub_products">
              &mvt:sub_product:code; 
    	<mvt:if expr="'Marmot' CIN l.settings:item:sub_product:code" > (DO Something)
    	</mvt:if>
    </mvt:foreach>
    Facewest- UK Adventure sports Equipment
    www.facewest.co.uk

    #2
    Re: Using the CIN Function

    It only seems to work when there is an Exact Match. I sent this in to Rick and Jon the other day as a possible bug.

    I ended up writing a Component Module to work around this issue for a project I was working on.
    Thank You,

    Nerd Boy

    http://www.nerdboyinc.com

    1-855-Nerd-Boy

    Comment


      #3
      Re: Using the CIN Function

      You are iterating through the sub_products array not the item:sub_products array.

      What happens if you test for 'Marmont' CIN l.settings:sub_product:code (notice the item array is removed)?
      http://www.alphabetsigns.com/

      Comment


        #4
        Re: Using the CIN Function

        If the Product Code: Glock the code returns a 1.

        If the Product Code is: Glock123 the code returns a 0

        Is this correct?

        <mvt:if expr="'|'$l.settings:product:name$'|' CIN '|Glock|'">
        <mvt:assign name="g.nbiglock" value="1" />
        </mvt:if>

        <mvt:assign name="g.nbiglock1" value="'|'$l.settings:product:name$'|' CIN '|Glock|'" />

        <br>NBIGlock: &mvte:global:nbiglock
        <br>NBIGlock: &mvte:global:nbiglock1;
        Thank You,

        Nerd Boy

        http://www.nerdboyinc.com

        1-855-Nerd-Boy

        Comment


          #5
          Re: Using the CIN Function

          Originally posted by alphabet View Post
          You are iterating through the sub_products array not the item:sub_products array.

          What happens if you test for 'Marmont' CIN l.settings:sub_product:code (notice the item array is removed)?

          Doh!

          That's the one! Works fine now.

          Many Thanks

          Jake
          Facewest- UK Adventure sports Equipment
          www.facewest.co.uk

          Comment

          Working...
          X