Totally Zenned
- Join Date:
- Feb 2006
- Posts:
- 588
- Plugin Contributions:
- 0
Totally Zenned
Zen Follower
It is the browser that resolves the URL for images.
If the image is referred to as "/images/some-image.png" with a leading slash then it will always be pulled from the /images/ folder in the root of the site.
If the image is referred to as "/zencart/images/some-image.png" with a leading slash then it will always be pulled from the /images/ folder inside the /zencart/ folder in the site root.
If the image is referred to as "zencart/images/some-image.png" without a leading slash then the location will be deemed to be relative from the folder of the currently viewed HTML page.
With relative linking, for the page at "/localhost/Zencart/Battery-Backup-UPS-Power-Protection/Power-
Saving-Back-UPS-ES-8-Outlet-550VA-230V" the zencart folder for images is therefore deemed to be inside the "/localhost/Zencart/Battery-Backup-UPS-Power-Protection/" folder.
With relative linking, for the page at "/localhost/Zencart/Power-Saving-Back-UPS-ES-8-Outlet-550VA-230V" the zencart folder for images is therefore deemed to be inside the "/localhost/Zencart/" folder.
That is, when the location of the image is specified without a leading slash, the URL for the HTML page is stripped back to the final slash, and the location of the image is added to the end of that.
The solution is to refer to all image, css, and JS files with a leading slash. Always.
Never use notation like "somelocation/somefile.png" on your site. Always begin with a leading slash.
Never use notation like "../somelocation/somefile.png" on your site. Always avoid the double dots.
Online since 1995.
Totally Zenned
g1smd:
It is the browser that resolves the URL for images.
If the image is referred to as "/images/some-image.png" with a leading slash then it will always be pulled from the /images/ folder in the root of the site.
If the image is referred to as "/zencart/images/some-image.png" with a leading slash then it will always be pulled from the /images/ folder inside the /zencart/ folder in the site root.
If the image is referred to as "zencart/images/some-image.png" without a leading slash then the location will be deemed to be relative from the folder of the currently viewed HTML page.
With relative linking, for the page at "/localhost/Zencart/Battery-Backup-UPS-Power-Protection/Power-
Saving-Back-UPS-ES-8-Outlet-550VA-230V" the zencart folder for images is therefore deemed to be inside the "/localhost/Zencart/Battery-Backup-UPS-Power-Protection/" folder.With relative linking, for the page at "/localhost/Zencart/Power-Saving-Back-UPS-ES-8-Outlet-550VA-230V" the zencart folder for images is therefore deemed to be inside the "/localhost/Zencart/" folder.
That is, when the location of the image is specified without a leading slash, the URL for the HTML page is stripped back to the final slash, and the location of the image is added to the end of that.
The solution is to refer to all image, css, and JS files with a leading slash. Always.
Never use notation like "somelocation/somefile.png" on your site. Always begin with a leading slash.
Never use notation like "../somelocation/somefile.png" on your site. Always avoid the double dots.
Thanks for the reply...
Though I am still unsure of what the issue is.
What should I have in my css file ??
or
I have actually tried both, and neither option resolves the issue.
Option 1 leaves me with no images at all on the product I have edited and no sidebox header images..
Option 2 has all images in place and header log etc, EXCEPT for the image that I have added mapping to.. That page has not product image and no header logo or other images that are supposed to be there../.
aaarrgghhh :censored:
Norts And Ones
Norts And Ones
Zen Follower
Find the "real" URL for the image in full, such as "www.example.com/folder/folder/filename.png" and simply remove the "www.example.com" part and link to the "/folder/folder/filename.png" part with a leading slash.
Online since 1995.
Totally Zenned
g1smd:
Find the "real" URL for the image in full, such as "www.example.com/folder/folder/filename.png" and simply remove the "www.example.com" part and link to the "/folder/folder/filename.png" part with a leading slash.
So this image, which will not show when it's product is mapped has a full path of
(I am using this on test server..
)
h t t p://localhost/Zencart/Battery-Backup-UPS-Power-Protection/images/medium/APC/BE550G-AZ_MED.jpg
Which you say should be linked as
/Battery-Backup-UPS-Power-Protection/images/medium/APC/BE550G-AZ_MED.jpg
Where am I editing this information ?
Excuse my ignorance, but what do these links have to do with the CSS file.. there is no reference in the css to the actual image folder for the products, only the template images..
Also, as you may be able to tell, I am using different folders for small, medium and large images.
Is the CEON mod able to distinguish this ?
Norts And Ones
Norts And Ones
Zen Follower
Does this mod work when moving a site to a new host, testing is required, and the urls use a temporary address like:
http://62.120.33.8/~joeblow/ instead of http://joeblow.com ??
any special consideration needed for the .htaccess file?
thanks
New Zenner
v1.3.9d is out. I suppose we need a new version of this again...
Totally Zenned
rectangle:
v1.3.9d is out. I suppose we need a new version of this again...
I'd like to get the current version working first.!!! :dontgetit
Norts And Ones
Norts And Ones
New Zenner
I have many of the same name product, generate the same URL Of automatically.
I cannot each check,And correcting errors.
Excuse me, how do I do?
Zen Follower
dajiaoyazi:
I have many of the same name product, generate the same URL Of automatically.
I cannot each check,And correcting errors.
Excuse me, how do I do?
Hi, you can type in your own custom url for each product.
In each product where it says; "Tick this box to have the URI auto-generated for this product." - do that, but then go back and change the duplicates.
i.e; manually type the URL in the field of the product.
Donation made. Enjoy those donuts! :-)
Totally Zenned
Hi Scott,
I'm depserate to get the module running on a Test Site as I need/want to go live very soon with our updated site.
I'm having issues with images not displaying (have a read of the posts above for reference).
Are you able to offer any insight as to what else I need to do to get sorted ?
Would appreciate any input you could offer...
Cheers,
Mike
Norts And Ones
Norts And Ones
New Zenner
Scott_C:
Hi, you can type in your own custom url for each product.
In each product where it says; "Tick this box to have the URI auto-generated for this product." - do that, but then go back and change the duplicates.
i.e; manually type the URL in the field of the product.
I know how to manually modify the URL.But how do I find these same url?
Because I have a lot of name of products.
Zen Follower
Mike_Dean:
Hi Scott,
I'm depserate to get the module running on a Test Site as I need/want to go live very soon with our updated site.
I'm having issues with images not displaying (have a read of the posts above for reference).
Are you able to offer any insight as to what else I need to do to get sorted ?
Would appreciate any input you could offer...
Cheers,
Mike
Hi Mike, do you have a link to your test site? Sorry, I havent had a chance to read any previous threads if you already posted it.
Donation made. Enjoy those donuts! :-)
Zen Follower
dajiaoyazi:
I know how to manually modify the URL.But how do I find these same url?
Because I have a lot of name of products.
Hi, are you saying you have lots of products with the same name? May I ask why?
Donation made. Enjoy those donuts! :-)
New Zenner
Many of the same name Products,I want to find them, then manually modify name.
Totally Zenned
Scott_C:
Hi Mike, do you have a link to your test site? Sorry, I havent had a chance to read any previous threads if you already posted it.
Hi Scott.
The test site is on my local PC (using WAMP server)
Not sure how I would give you access to it ???
Thanks,
Mike
Norts And Ones
Norts And Ones
Passed
Hi Mike,
Mike_Dean:
I have been trying to resolve the issue, (as it's good to try and do it oneself for future reference)
I am definite believer in trying to do things yourself as a great aid to learning however it seems that this issue is proving a bit too difficult for you.
You must make all the image URIs/paths use absolute paths.
If images are showing for some parts of the site and not others then you don't have them set to being absolute (or "absolute" wouldn't be the correct term! :) ).
Check **all **your templates and **all **your CSS files for links to images and make the necessary adjustments.
I'm afraid that if you still can't get them to work then you have simply missed something and you should pay someone else to help you (unless some very kind soul wants to give you their time for free ;) ).
All the best..
Conor
ceon
Passed
Hi,
rxalex:
I am looking to switch to Ceon after using Ultimate. My coder re-installed the catalog so it changed all product id's essentially pointing to that item but other id showing (product not found).
I'm not quite sure what you mean.. are you saying that you have URIs for your "old" site which point to products on your new site but as the product IDs are new/different the "expected" page isn't being displayed?
rxalex:
Question, if I set ceon to automatic url's can something like this occur with it?
I'm not sure what you are saying has occurred! Ceon URI Mapping creates "historical" URIs when URIs change so all old URIs are redirected to the "current" URI.. however this functionality requires that products still have the same product IDs, categories still have the same category ID etc.
Hope that helps!
All the best..
Conor
ceon
Totally Zenned
conor:
Hi Mike,
I am definite believer in trying to do things yourself as a great aid to learning however it seems that this issue is proving a bit too difficult for you.
You must make all the image URIs/paths use absolute paths.
If images are showing for some parts of the site and not others then you don't have them set to being absolute (or "absolute" wouldn't be the correct term! :) ).
Check **all **your templates and **all **your CSS files for links to images and make the necessary adjustments.
I'm afraid that if you still can't get them to work then you have simply missed something and you should pay someone else to help you (unless some very kind soul wants to give you their time for free ;) ).
All the best..
Conor
ceon
Thank you Conor,
Perhaps it's difficult to understand my problem, hence the difficulty in finding a solution.
The module has installed correctly, else I would not be able to see the Config option in admin correct ??
I have then checked and re-checked my css style sheet, and my image links in there are now as follows
("/zencart/includes/templates/Lite Blue/images/......gif")
So I have then gone into ONE product only and checked the box to allow automatically create the URI Mapping.
I have also checked the box under the Category that the products belong too, and allowed mapping.
If I then go to the category on the test site, I can see all the images correctly in the list view, but when I select actual the product that I have mapped, The page loads, but the images are not loaded..
Please note that I am using Tabbd Product Pro module and also using different folders for small, medium and large images..
So...can I ask again..
Apart from the CSS file, what other files call for images that I need to check ???
I cannot locate any other files, be they css or php that call for the images.
So I cannot find where to ensure that the image URIs/paths use absolute paths.
If I could ask 5 more minutes of your time to offer support it would be appreciated..
Norts And Ones
Norts And Ones
Passed
Hi,
loosefast:
Does this mod work when moving a site to a new host, testing is required, and the urls use a temporary address like:
http://62.120.33.8/~joeblow/ instead of http://joeblow.com ??
No, you should create a test site that uses the exact same URI structure as the planned final site.
I.e. you should use something like:
test.joeblow.com
when you are intending the final site to be
joeblow.com
You cannot use
joeblow.com/test/
If you did you'd have to manually update all the URIs when you move from the test site to the live site, or you'd have to carry out a "search and replace" of the Ceon URI Mapping database table's **uri **field.
loosefast:
any special consideration needed for the .htaccess file?
The .htaccess files for both sites will be different if the DIR_WS_CATALOG configuration option is different. Full instructions are in the docs about how to create the necessary rewrite rule for each site individually.
From experience it would be better if you used a new test site methodology using subdomains instead of folders.. it's easier and more professional if you ask me!
All the best..
Conor
ceon
Tell staff why this post should be reviewed.