Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Can I use <img>tags in a description of a product (or how could i make this possible?

    Hi,
    I'm pretty new to Zen Cart and I am setting up a local server and a startup-site at www.elfiets.xyz
    This is with a whole big cart in another system, and actually I used the download here to put it into Dutch instead of English.
    Sometimes this makes it difficult to find things and I believe some settings are not existing in the admin-tool but should be able to do directly in the database of course.
    The old site is made in an old version of PHP and mysql and the hoster has shut down that versions so that all the scripts are not working anymore and so I'm kind of stuck with half a site so I'm now making a transition to Zen. I made a transsition-site on www.elfiets.nl with a large product list, but even that won't work anymore when updating to php 5.5...


    My question: in the old site I'm translating there are 1000-s of articles that have a lot of linked images in it. In the database this is written something like [img]/productimage/no484.jpg[/img] which is translated to the right image and sub-image. This is besides the normal image that is related to the product.
    I have seen that it should be possible to use the automatic display of pictures that have about the same name but the linked images can be entirely different place and name.
    So, it would be helpfull if I could use some image-tags to point and display the image directly from the database (product-tables).

    Is this possible somehow?

    As you can see, I tried it but it shows up as regular text:
    http://www.elfiets.xyz/index.php?mai...roducts_id=181
    Last edited by elvinhaak; 5 Feb 2017 at 01:18 AM.

  2. #2
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    To make clear:
    the images that are shown in the old store (in a field in a table in the form of text with this kind of image-tags) are extra explanations.
    So, sometimes they are in the middle of a sentence and are linked in the right order (so, first do this (picture), then do that (picture), then that (picture) and to finish (picture), sometimes they are extra pictures belonging to only one article (like the left side of a lamp instead of the front), sometimes they are the explanation for how to measure things like a bolt or screw.
    In that last case, a lot of articles are showing the same picture.

    in ZEN-cart, the last two things could be done with putting them into product-types and putting extra images with same filename to the article (although sometimes there would be double pictures ), but this cannot be done with auto-translation (in scripts in the temperary site), but the first thing (explaining the order with text) is only possible with these kind of tags I think.

  3. #3
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    The field containing these links would be products_description since the whole text with the images is in one field in the original database.

    mainly 3 things this way:
    a) telling in which order things can be done.
    for example first release screw (picture), then open (picture), then read (picture)
    b) just simple extra pictures (sideview of a light instead of just front)
    c) big explaination for measurement for a whole number of articles (can be in different categories in the shop)

    I need to make some translation-script (write it in php, probably in the local temperary server) so i can make some adjustments

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Quote Originally Posted by elvinhaak View Post
    Hi,
    I'm pretty new to Zen Cart and I am setting up a local server and a startup-site at www.elfiets.xyz
    This is with a whole big cart in another system, and actually I used the download here to put it into Dutch instead of English.
    Sometimes this makes it difficult to find things and I believe some settings are not existing in the admin-tool but should be able to do directly in the database of course.
    The old site is made in an old version of PHP and mysql and the hoster has shut down that versions so that all the scripts are not working anymore and so I'm kind of stuck with half a site so I'm now making a transition to Zen. I made a transsition-site on www.elfiets.nl with a large product list, but even that won't work anymore when updating to php 5.5...


    My question: in the old site I'm translating there are 1000-s of articles that have a lot of linked images in it. In the database this is written something like [img]/productimage/no484.jpg[/img] which is translated to the right image and sub-image. This is besides the normal image that is related to the product.
    I have seen that it should be possible to use the automatic display of pictures that have about the same name but the linked images can be entirely different place and name.
    So, it would be helpfull if I could use some image-tags to point and display the image directly from the database (product-tables).

    Is this possible somehow?

    As you can see, I tried it but it shows up as regular text:
    http://www.elfiets.xyz/index.php?mai...roducts_id=181
    Yes, you can do what you are asking but in this case "/images/ELF_Articles/no4.jpg" is an invalid path which is why no image.

    There is a module Easy Populate that you will find helpful in what you are trying to accomplish. It allows you to use a Spreadsheet to setup many things then upload the Spreadsheet to enter the information into the database. Saves having to do one Product at a time. Will take so time and testing to learn it but well worth the effort.

    Welcome to Zen Cart.

  5. #5
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Thanks for your reaction.

    In the table, in table product_description, field product_description is written:
    Dit is een testartikeltje in de aandrijving. Zal dit werken?
    <img>/images/ELF_Articles/no4_.jpg</img><br><br><IMG>
    ELF_Articles/no4_.jpg</IMG>
    and when I look it up, the image is showing up with the URL:
    www.elfiets.xyz/images/ELF_Articles/no4_.jpg

    I did some renaming and I'm sure as you can see the image is there.

    So what am I overlooking? Probably something quite simple.
    I tried to rename the ELF_Articles-folder into ELFArticles but that didn't help eather.

    I will try the Easy Populate module after I have this working... it might be very helpfull

  6. #6
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Trying out further and further, I found out that a direct complete html-code works (thus not like in forums and in my old site).
    Like:
    <img src="/images/ELF_Articles/no4_.jpg">

    Will I get problems (security for example) if I fill the database with these codes without further escaping and such?

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Quote Originally Posted by elvinhaak View Post
    Trying out further and further, I found out that a direct complete html-code works (thus not like in forums and in my old site).
    Like:
    <img src="/images/ELF_Articles/no4_.jpg">

    Will I get problems (security for example) if I fill the database with these codes without further escaping and such?
    No security-related issues, but to ensure that you are generating valid HTML, you must include the alt-tag:
    Code:
    <img src="/images/ELF_Articles/no4_.jpg" alt="textual description of the image">

  8. #8
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Also be sure to use the lower case version of the img tag: <img> not <IMG> and generally speaking should also "close" the tag: <img /> the other required parts (src= and alt=) have been left out of the above to simplify the discussion.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Whether you close the tag depends on your template; if you're using an HTML5 template, then closing the img tag is not required.

  10. #10
    Join Date
    Jan 2017
    Location
    nearGoes Netherlands
    Posts
    6
    Plugin Contributions
    0

    Default Re: Can I use <img>tags in a description of a product (or how could i make this possi

    Thanks!
    I'm going to use this way. Currently in proces of checking and where needed changing the existing url's... lots of work.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How can I make my product description space bigger ?
    By stylenote in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 19 Oct 2011, 04:27 PM
  2. how could I make my site like this ?
    By raikou in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Jun 2008, 10:18 AM
  3. How can make product listing layout like this way.
    By jackyhu in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 9 May 2008, 11:36 AM
  4. How could I make single words in products-description linked?
    By jensderknipser in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 15 Oct 2006, 10:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR