Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Attribute images are not showing.

    This seems really basic, but for the life of my I can't get them to display.
    On the product, the radio buttons are showing, but not the images.
    http://www.fabfotoframes.com/index.p...&products_id=3

    Here is my set up:
    In Admin-> Enable Attribute images is set to TRUE
    Option name: moulding
    Option values: float1, float2, float3, float4,
    Images names: Images are in Attribute folder
    moulding_float1.jpg
    moulding_float2.jpg
    moulding_float3.jpg
    moulding_float4.jpg

    What am I missing to connect the images to the options????
    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attribute images are not showing.

    If you switch to Classic Template do the images appear?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Attribute images are not showing.

    Don't know. I do not have the classic template uploaded. I removed it from the file structure.

  4. #4
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Attribute images are not showing.

    Added Classic back to offline/localhost site. Images still do not appear.
    Here is screen captue of Attribute Controller (offline site).




    Anything here look incorrect?

    Thanks

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attribute images are not showing.

    Nope ... just the one icon ... if an image is on the Attribute you see the gold dot ... if no image then you see nothing ...

    If your template has been altered and removed the attribute images then they will not show ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Attribute images are not showing.

    If I may start from the basics... How do I attach and image to an attribute?
    Were should I check the template for the attribute image?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attribute images are not showing.

    In the Attributes Controller ... when you Add or Edit an Attribute you will see it listed:
    Attributes Image Swatch:
    Attributes Image Directory:
    If you do not see these, then look in the Configuration ... Attribute Settings ... and see what you have enabled or disabled and check:
    Enable Attribute Images
    Enable the Attributes Images.

    true
    false
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Attribute images are not showing.

    Bug in Attribute Controller?
    I added the image names manually to the database
    table: products_attributes
    field: attributes_image

    This worked and the attribute images displayed (worked on both local and hosted sites).
    However, when I then go to Attribute Controller and try to edit the image name, it does not change. When I delete the attribute and use insert to add attribute with image. The image does not save, but the rest of the information does (do doesn't appear to be a database permission issue).

    Could there be a bug in the Attribute Controller?
    I checked that attributes_controller.php has not been changed. File still has Date Modified as 4/8/2007.

    Problem is same on local and hosted site. Happens with both IE and Firefox.

    Once again, thanks for the great support

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attribute images are not showing.

    Do you have the images directory set to the right permissions of 777? The default directory is:
    /images/attributes
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Attribute images are not showing.

    I think it is much more basic than directory names and permissions.

    From the Attributes controller, when using the Insert to add a new attribute, all the information writes to the database expect the attribute image name.

    When I modify attributes_controller.php (in Admin) to remove the IF statements and get down to just the 2 lines that set the variable.
    And then remove the attributes_image input and hardcode some text for the image file name.
    Then the attributes_image field is written to in the database - and is what I would expect "attributes/filename.jpg".

    Around line 227
    Code:
    //          if (isset($_POST['attributes_image']) && zen_not_null($_POST['attributes_image']) && ($_POST['attributes_image'] != 'none')) {
                $attributes_image = "filename.jpg"; //zen_db_prepare_input($_POST['attributes_image']);
     //         } else {
     //           $attributes_image = '';
     //         }
    
     //         $attributes_image = new upload('attributes_image');
     //         $attributes_image->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
     //         if ($attributes_image->parse() && $attributes_image->save($_POST['overwrite'])) {
               $attributes_image_name = $_POST['img_dir'] . $attributes_image ->filename;
      //        } else {
       //         $attributes_image_name = (isset($_POST['attributes_previous_image']) ? $_POST['attributes_previous_image'] : '');
        //      }
    I change one line from
    Code:
    $attributes_image = "filename.jpg"; //zen_db_prepare_input($_POST['attributes_image']);
    TO:
    Code:
    $attributes_image zen_db_prepare_input($_POST['attributes_image']);
    And the Attributes Image Swatch input in Admin Attribute Control no longer is inserted into the attributes_image filed.
    What is in the field: "attributes/"
    What is expected: "attributes/filename.jpg"

    By the way, tried "Updating" versus "Inserting". The attributes_image field still does not change.

    Working down through the commented sections of code. Nothing changes until I uncomment the last if statement:
    Code:
            if ($attributes_image->parse() && $attributes_image->save($_POST['overwrite'])) {
               $attributes_image_name = $_POST['img_dir'] . $attributes_image->filename;
              } else {
                $attributes_image_name = (isset($_POST['attributes_previous_image']) ? $_POST['attributes_previous_image'] : '');
              }
    With this code uncommented, nothing is written to the attributes_image field of the database. I had "overwrite" = NO

    I think I am at my limit of figuring out the code. Any other ideas?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Images are not showing anymore on my site
    By faynart in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 13 Dec 2011, 02:28 AM
  2. product images are not showing..help!!!!!
    By shawnstar86 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 Aug 2010, 09:56 AM
  3. Images are not showing
    By thunder11 in forum General Questions
    Replies: 1
    Last Post: 1 Aug 2009, 07:12 PM
  4. Attribute prices once on special are not showing
    By this side up in forum Setting Up Specials and SaleMaker
    Replies: 4
    Last Post: 2 Feb 2009, 04:56 PM
  5. Froggle listings are working but images are not showing up
    By dealbyethan.com in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Aug 2006, 12:49 AM

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