Announcement

Collapse
No announcement yet.

Need help with code for "Sort Shipping Plus Free Shipping Option" module

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

    #16
    Re: Need help with code for "Sort Shipping Plus Free Shipping Option" module

    Originally posted by Bruce - PhosphorMedia View Post
    In the Search Results and Category Product List templates, make sure that the custom field is selected.
    Search results layout will be in the Power Search module admin.
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    Comment


      #17
      Re: Need help with code for "Sort Shipping Plus Free Shipping Option" module

      Originally posted by wcw View Post
      g.Product_Code variable is only valid on the product page. You have to figure out what it is on the other pages, e.g. l.all_settings:product:code on some pages.
      I'm trying to do this within Power Search. I've tried this and it did not work:

      Code:
      <mvt:item name="customfields" param="Read_Product_Code( l.all_settings:product:code, 'freeship', g.freeship)" />        
      <mvt:if expr="g.freeship EQ 'yes'">
      <img alt="FreeShipping" src="graphics/freeship129x35.gif">
      </mvt:if>
      Can Power Search read the "customfields" tag? I don't see a way to add the "customfields" item.

      Thanks,
      Eric

      Comment


        #18
        Re: Need help with code for &quot;Sort Shipping Plus Free Shipping Option&quot; module

        It is not up to Power Search to read it. It is up to the customfields module to read it. Its item would need to be assigned to the page you are trying to run it on. In most cases, that is the SRCH page. powrsrch is simply an item assigned to the SRCH page, just like many other items. Is customfields assigned to the SRCH page?
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment


          #19
          Re: Need help with code for &quot;Sort Shipping Plus Free Shipping Option&quot; module

          I got it working. I had to use a table to get it to display right, but here is the code:

          Code:
          <table style="text-align: left; width: 100%;" border="0"
           cellpadding="0" cellspacing="0">
            <tbody>
              <tr>
                <td align="undefined" valign="undefined"><mvt:if expr="l.settings:product:inv_active">&mvt:product:inv_short;</mvt:if></td>
                <td align="undefined" valign="undefined"><mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'freeship', g.freeship)" />        
          <mvt:if expr="g.freeship EQ 'yes'"><big><span style="font-weight: bold; color: red;">Ships FREE!</span></big>
          </mvt:if></td>
              </tr>
            </tbody>
          </table>
          Thanks everyone for your help.

          Eric

          Comment

          Working...
          X