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

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

    What I want to do is display a "This item ships FREE" message (on the product page) on products that are specifically listed in the "When Order Contains Only These Product Codes Customer Gets Free Shipping" section of this module.

    Is there conditional code I can use to do this?

    Thanks!

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

    I don't think so without any wild coding - go crazy!! I would probably use a custom product field instead. I know more work to maintain but doable. You could also use a common denominator as a conditional to display the message.
    Andreas Toman
    PCINET, LLC

    Miva Merchant Design, Development, Integration & Support
    We built over 200 Miva Merchant stores!
    Miva shopping cart design & integration service and see our Portfolio!


    e-mail: [email protected]
    web: www.pcinet.com
    LinkedIn: Andreas Toman
    phone: (786) 250-2056 (Miami, FL)

    Comment


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

      I'm not aware of a way to test for that setting in the module, but you could use a custom product field to flag products individually to display any message you like. You can learn about setting up custom fields in our reference guide at http://www.mivamerchant.com/referenceguide

      Once you have the custom field setup, make sure the customfields item is assigned to PROD, and here's how you could print the message on the page. For this example I'll assume you have a Custom Product Field with a type of Checkbox and a code of "freeShip".

      This code will go wherever you'd like the message to appear on the page:
      Code:
      <mvt:item name="customfields" param="Read_Product_Code( g.Product_Code, 'freeShip', g.freeShip)" />        
      <mvt:if expr="g.freeShip EQ 'yes'">
        This product ships FREE!
      </mvt:if>
      To flag a product to display that message you'd just go to the product in the admin, go to the Custom Fields tab, and check the checkbox for your "Free shipping" custom field.
      Last edited by KNewbrough; 06-04-14, 11:34 AM.
      Kyle Newbrough
      Technical Support / Web Developer
      Miva Merchant

      Comment


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

        Originally posted by KNewbrough View Post
        Once you have the custom field setup, make sure the customfields item is assigned to PROD, and here's how you could print the message on the page. For this example I'll assume you have a Custom Product Field with a type of Checkbox and a code of "freeShip".
        This is probably what we'll have to do. Thanks for the help! Can the "yes" be entered into the Custom Field in bulk somehow (so we don't have to edit each product individually)?

        Thanks again,
        Eric

        Comment


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

          Sure, just use the import function under utilities.
          Andreas Toman
          PCINET, LLC

          Miva Merchant Design, Development, Integration & Support
          We built over 200 Miva Merchant stores!
          Miva shopping cart design & integration service and see our Portfolio!


          e-mail: [email protected]
          web: www.pcinet.com
          LinkedIn: Andreas Toman
          phone: (786) 250-2056 (Miami, FL)

          Comment


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

            Just as a test I exported and edited 2 products. I only edited the price and uploaded the file. The strange thing is the price is correct on the product page, but not the search page. I deleted cookies thinking that could be it, but it's still wrong (old price) it the search results. I then went to the product in Admin and clicked "Update" just to see what would happen, and then the price was correct in the search results.

            Obviously I don't want to have to go to every product and hit Update. What am I doing wrong? How could the price show correct on the product page but not the search results page?

            Thanks!
            Eric

            Comment


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

              I'm also using Power Search. Could this have anything to do with it? Do I need to Rebuild the Power Search file?

              Comment


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

                If you used the mass product import to change prices, rebuild the power search mirror. If you use the turbo rebuild it only takes a few seconds.
                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


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

                  Yep, that worked. Thanks Bill.

                  Comment


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

                    Ha ha just wanted to ask if you are using Bill's module.

                    Nice to see you around Bill!!
                    Andreas Toman
                    PCINET, LLC

                    Miva Merchant Design, Development, Integration & Support
                    We built over 200 Miva Merchant stores!
                    Miva shopping cart design & integration service and see our Portfolio!


                    e-mail: [email protected]
                    web: www.pcinet.com
                    LinkedIn: Andreas Toman
                    phone: (786) 250-2056 (Miami, FL)

                    Comment


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

                      Originally posted by SpeakerRepair.com View Post
                      I'm also using Power Search. Could this have anything to do with it? Do I need to Rebuild the Power Search file?
                      LOL - Bill beat me to it.
                      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


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

                        Originally posted by KNewbrough View Post
                        This code will go wherever you'd like the message to appear on the page:
                        Code:
                        <mvt:item name="customfields" param="Read_Product_Code( g.Product_Code, 'freeShip', g.freeShip)" />        
                        <mvt:if expr="g.freeShip EQ 'yes'">
                          This product ships FREE!
                        </mvt:if>
                        To flag a product to display that message you'd just go to the product in the admin, go to the Custom Fields tab, and check the checkbox for your "Free shipping" custom field.
                        Kyle,

                        This code worked great on the product page to display the free shipping message, but I can't get it to work on the category and search pages. Would the code be different for those pages? I want to display the "This product ships FREE" above the "add to cart" link on the category and search results pages.

                        Thanks!
                        Eric

                        Comment


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

                          Originally posted by SpeakerRepair.com View Post
                          Kyle,

                          This code worked great on the product page to display the free shipping message, but I can't get it to work on the category and search pages. Would the code be different for those pages? I want to display the "This product ships FREE" above the "add to cart" link on the category and search results pages.

                          Thanks!
                          Eric
                          Can anyone give me some help with this?

                          Thanks,
                          Eric

                          Comment


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

                            In the Search Results and Category Product List templates, make sure that the custom field is selected.
                            Bruce Golub
                            Phosphor Media - "Your Success is our Business"

                            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                            phosphormedia.com

                            Comment


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

                              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.
                              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

                              Working...
                              X