Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default short description product on product info avev link more info on the same page

    Hello, I would like to make a short description of the products on the page products with a link more info that shows the whole text, I have description too long and the iudeale would be to show part of the desciption (character limits a 100) and clicking on more info the entire text appears on the info products page. I think the code at the bottom seems to do what I want but I can not make it work. a few things like aria-hidden

    PHP Code:
    echo zen_trunc_string (zen_clean_html ($products_description), 100' [more]'); 
    it's not the mod short description listing that I'm looking for.
    Giovanni,
    Zen Cart V1.5.8 + templates ZCA Bootstrap Template

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: short description product on product info avev link more info on the same page

    I tend to use the <details> and <summary> tags for this situation, although this is html5 coding.

    https://www.w3schools.com/tags/tag_summary.asp
    Simon

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: short description product on product info avev link more info on the same page

    Issue I see with using the summary/details tags is that without additional javascript/jquery to hide the summary when the details are shown then both will be on screen, the snippet of the original text and then the complete text.

    While I don't have a direct link to show the desired operation I have seen this type of portion text to be expanded display and that javascript/jquery has been involved to recognize the click action of selecting the more info without loading/reloading the page.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: short description product on product info avev link more info on the same page

    Unless I'm missing something, I seem to have it working without the need for any javascript - to make sure I disabled all javascript and it still works. So you can see, I'll send you a PM with the link, as I'd rather not post it here. The parts of the page that don't validate (which I'll need to work on) are not associated with the details/summary tags.

    Edit: scroll down to the sections with a 'plus'.
    Last edited by simon1066; 7 Jun 2019 at 05:51 PM.
    Simon

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: short description product on product info avev link more info on the same page

    Quote Originally Posted by simon1066 View Post
    Unless I'm missing something, I seem to have it working without the need for any javascript - to make sure I disabled all javascript and it still works. So you can see, I'll send you a PM with the link, as I'd rather not post it here. The parts of the page that don't validate (which I'll need to work on) are not associated with the details/summary tags.

    Edit: scroll down to the sections with a 'plus'.
    Correct, the use of summary/details is appropriate on the site provided: let's say the name of a person or object is given in the summary, clicking on that "section" opens the description of that object in more detail.

    What has been requested though is something like:
    + This is the best thing since sliced bread to support... more info

    If it were to use the summary/details configuration then clicking on it would result in:

    - This is the best thing since sliced bread to support... more info

    This is the best thing since sliced bread to support the benefit of this product.


    See how the "first" text would be reproduced twice? It appears that the concept sought is to bait with some leading content and then allow the full content to be seen. The application demonstrated by the site sent to me is appropriate for how it is used and perhaps the OP would change their desired content to be displayed even though the solution doesn't appear to align with the request.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2010
    Location
    France
    Posts
    279
    Plugin Contributions
    0

    Default Re: short description product on product info avev link more info on the same page

    I do not know how to summarize, but I have to be able to post part of the text of the description to see here what I would like to do.
    https://www.marktplaats.nl/a/auto-s/...-e153-p-m.html
    Giovanni,
    Zen Cart V1.5.8 + templates ZCA Bootstrap Template

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: short description product on product info avev link more info on the same page

    Quote Originally Posted by mc12345678 View Post
    What has been requested though is something like:
    + This is the best thing since sliced bread to support... more info

    If it were to use the summary/details configuration then clicking on it would result in:

    - This is the best thing since sliced bread to support... more info

    This is the best thing since sliced bread to support the benefit of this product.


    See how the "first" text would be reproduced twice? It appears that the concept sought is to bait with some leading content and then allow the full content to be seen. The application demonstrated by the site sent to me is appropriate for how it is used and perhaps the OP would change their desired content to be displayed even though the solution doesn't appear to align with the request.
    Ah yes, I misunderstood the question.
    Simon

 

 

Similar Threads

  1. Replies: 4
    Last Post: 20 Apr 2015, 09:09 AM
  2. Add 'More Info' link to product description on Category page
    By gotlogos in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Dec 2010, 03:33 AM
  3. Add more info link to product listing description when description is truncated
    By MaureenT in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Sep 2010, 05:44 PM
  4. Help! Product Info Short Description Using XML.
    By doinfinity in forum General Questions
    Replies: 0
    Last Post: 26 Feb 2010, 05:33 AM
  5. Product Info Link in the same window
    By icemint in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Apr 2008, 03:26 AM

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