Announcement

Collapse
No announcement yet.

Images in HTTPDocs area. How do I link to them?

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

    Images in HTTPDocs area. How do I link to them?

    I developed a test page with Javascript code to rotate products on my main page:

    The test worked great with links set up like this ..//images.gif
    docsavings.com/testmain3.html

    It did not however work at all when I placed the HEAD code in the SNFT and BODY code in the MESSAGE area.
    Was told I needed full links to the images in the Javascript I have in the HEAD area.

    Tried that in docsavings.com/testmain4.html but the images will not display using any of the following:

    http://www.docsavings.com/httpdocs/alereibinaxflu.gif
    http://www.docsavings.com/alereibinaxflu.gif
    http://docsavings.com/httpdocs/alereibinaxflu.gif
    http://www.docsavings.com/alereibinaxflu.gif

    How can I link to my images not using the ../image.gif method?

    Thanks!

    #2
    Re: Images in HTTPDocs area. How do I link to them?

    You don't use absolute links to images, however you do have to understand from where Merchant is referencing resources.

    If your Merchant store has a url like:

    www.thisdomain.com/mm5/merchant.mvc...

    then its running in the /mm5 directory of your store.

    If it was

    www.somedomain.com/Merchant5/merchant.mvc

    then it would be running in the /Merchant5 directory.

    So, create a directory under the directory where merchant is running called /images, and then the image path images/whatever.gif will work. Alternately, you can alwasy go back to the root directory relatively with /mm5/images/mypicture.gif (or whatever the merchant directory is.
    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


      #3
      Re: Images in HTTPDocs area. How do I link to them?

      Bruce,

      I really appreciate you trying to help me out. Unfortunately, none of the changes suggested in this thread, or the previous one I started, worked. Putting a ticket in doesn't help either since "they don't support code" even though the code works except in Merchant 5.

      I've now spent 5 hrs doing something that should have been simple. I know the page with the javascript works since I proved it on a test page but I can't get it work in MM5. It's times like these, I'm just ready to abandon miva and move to another storefront type.

      At this point it would be worth it to pay a consultant to get it working. Anyone know of a great one?

      Comment


        #4
        Re: Images in HTTPDocs area. How do I link to them?

        Originally posted by macmike00 View Post
        Bruce,

        At this point it would be worth it to pay a consultant to get it working. Anyone know of a great one?
        Bruce is a great one!
        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


          #5
          Re: Images in HTTPDocs area. How do I link to them?

          First off, you'd never use httpdocs within your path, since that is your root folder. When you type docsavings.com (and with folders or images of it) in your browser, it will reference items within the httpdocs folder. Also, when you have your images linked as you do your logo: docsavings.com/logomv.gif, that is outside of your miva store or outside of the mm5 folder...you do not want that...it should be within your mm5 folder, preferrably graphics/00000001 folder, or if you do as Bruce said and make an image folder graphics/images.

          Your path to your Miva store is: http://docsavings.com/mm5/merchant.mvc?
          Your path to images within Miva, which do work already is (ie: your horizontal navbar buttons):http://www.docsavings.com/mm5/graphi...historyror.jpg

          So...you can now upload your images to your graphics/00000001/ folder, just as you did your logo and your historyror.jpg nav buttons, ect. For better organization, you can do as Bruce said and create an images folder within your mm5/graphics folder.

          If you put the images into your graphics/00000001/ folder (where your nav buttons are now), you can now reference them with a relative link of: graphics/00000001/image-name.jpg. Or if you created the images folder within the graphics folder, you reference them relatively with: graphics/images/image-name.jpg.

          If you are inserting the script within your storefront, make sure the script for the head section is between the <head>here</head> tags. For the rest of the script that goes in your body section, place it in the Content tab of the SFNT page.

          There's no reason why it wouldn't work this way now other than your script not being correct.

          Hope this helps.

          Jamie
          Jamie Donaldson
          JSDVS Web Design / Development
          Web Design | Web Development | E-commerce Design & Integration

          Comment


            #6
            Re: Images in HTTPDocs area. How do I link to them?

            Jamie,

            Thanks for the tips. I did follow Bruce's advice. It just didn't work with the Javascript. The script itself is working fine at docsavings.com/testmain3.html. When I put it on the storefront the page will show rotating captions without the pictures and without the rotating links.

            I think the problem is in the SNFT and the MESSAGE area. I tried Bruce's suggestion to move the images into mm5 images folder and it didn't work. I'm going to try to ditch the message area and just go with everything in the SNFT area. Not sure if I'm supposed to do that. The store was ported over from Merchant 4 by hostasaurus with the message area set up. I always assumed that was the proper way to set it up but maybe not.

            If I have all the code stored in the SNFT area, it may work. I'll try that. I also wonder if I need to put the Javascript itself in a new place. Right now I have it in the httpdocs folder.

            Comment


              #7
              Re: Images in HTTPDocs area. How do I link to them?

              No go on what I tried. Put all the code in the SNFT area. Images are in the mm5 folder inside an images folder. HEAD code has this in it:

              var rotator1 = {
              path: 'images/',
              speed: 4000,
              id: 'r1',
              images: ["images/alereibinaxflu.gif", "images/aconmono.jpg", "images/fhc101.jpg"],
              actions: ["http://www.docsavings.com/mm5/merchant.mvc?Screen=PROD&Store_Code=D&Product_Code =416-022&Category_Code=rflumono2", "http://www.docsavings.com/mm5/merchant.mvc?Screen=PROD&Store_Code=D&Product_Code =Mono&Category_Code=rflumono2", "http://www.docsavings.com/mm5/merchant.mvc?Screen=PROD&Store_Code=D&Product_Code =FHC101&Category_Code=RPG"],
              bTrans: true,
              bMouse: true,
              captionId: 'img_caption',
              captions: ["BINAX Rapid flu 22/bx $269", "Rapid Mono 20/bx $38!", "Urine Preg strips 100/bx $49!"]

              }


              Links don't work and images don't appear BUT the Captions do rotate through just fine.

              Thoughts?

              Comment


                #8
                Re: Images in HTTPDocs area. How do I link to them?

                I've asked my design team to chime in, they'll be able to figure out what's wrong. It almost certainly has to do with your paths and not the location in the admin. It'll be tomorrow before they can reply.
                Thanks,

                Rick Wilson
                CEO
                Miva, Inc.
                [email protected]
                https://www.miva.com

                Comment


                  #9
                  Re: Images in HTTPDocs area. How do I link to them?

                  Originally posted by macmike00 View Post
                  Jamie,
                  I'm going to try to ditch the message area and just go with everything in the SNFT area. Not sure if I'm supposed to do that.
                  If I have all the code stored in the SNFT area, it may work. I'll try that.
                  It shouldn't make any difference whether it is in the content tab or within the SFNT page template...it should work in either place.

                  Originally posted by macmike00 View Post
                  I also wonder if I need to put the Javascript itself in a new place. Right now I have it in the httpdocs folder.
                  As for where you put the javascript, since you are using your storefront as your home page, if it is in a separate file (ie: my-javascript-file.js), it should be in the mm5 folder. You then reference it my-javascript-file.js in your head section of your page. If it is a copy/paste/put in the head content script, you copy/paste it into the head section of the SFNT page. Don't reference it both ways though...only one.

                  Hope this helps,

                  Jamie
                  Jamie Donaldson
                  JSDVS Web Design / Development
                  Web Design | Web Development | E-commerce Design & Integration

                  Comment


                    #10
                    Re: Images in HTTPDocs area. How do I link to them?

                    A couple issues I noticed.

                    Your image tags for the rotating images don't exist in the source code on SFNT. It looks like they were left out.

                    The second thing is the paths to the images loos to be incorrect. You set the path in the path variable. This looks fine. I don't think you need the ../ before each image name. I think you can just put the image name itself and it will use the path you have defined above.

                    Code:
                    images: ["alereibinaxflu.gif", "aconmono.jpg", "fhc101.jpg"]
                    Last edited by Brennan; 10-25-11, 04:29 PM.
                    Brennan Heyde
                    VP Product
                    Miva, Inc.
                    [email protected]
                    https://www.miva.com

                    Comment


                      #11
                      Re: Images in HTTPDocs area. How do I link to them?

                      Originally posted by Brennan View Post
                      A couple issues I noticed.


                      The second thing is the paths to the images loos to be incorrect. You set the path in the path variable. This looks fine. I don't think you need the ../ before each image name. I think you can just put the image name itself and it will use the path you have defined above.

                      Code:
                      images: ["alereibinaxflu.gif", "aconmono.jpg", "fhc101.jpg"]
                      Just got back to this...so busy with other aspects of the company. I changed the images to the path above and things worked great! The images and the links to the products now rotate perfectly.

                      Thanks so much for your help.

                      Comment

                      Working...
                      X