Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Aug 2006
    Posts
    166
    Plugin Contributions
    2

    Default Re: Record Company image

    hi
    in the tpl_product_music_info_display.php

    after <!--eof Product date added/available -->
    I added:

    <!--bof Product URL -->
    <?php
    if (zen_not_null($products_url)) {
    if ($flag_show_product_info_url == 1) {
    ?>
    <p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
    <?php
    } // $flag_show_product_info_url
    }
    ?>
    <!--eof Product URL -->

    <!--bof Product artists url and image -->
    <?php if ($flag_show_product_music_info_artist == 1 or $flag_show_product_music_info_genre == 1 or $flag_show_product_music_artist == 1) { ?>
    <ul id="productDetailsList" class="floatingBox back">
    <?php echo (($flag_show_product_music_info_artist == 1 and !empty($products_artist_name)) ? '<li>' . TEXT_ARTIST_URL . $products_artist_name . '</li>' : '') . "\n"; ?>
    <?php
    // $flag_show_product_info_record_company
    ?>
    </ul>
    <br class="clearBoth" />
    <?php
    }
    ?>
    <?php echo sprintf('<a href="' . TEXT_ARTIST_IMAGE_URL, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_artist_url), 'NONSSL', true, false) . '">' . zen_image(DIR_WS_IMAGES . $record_artists->fields['artists_image']). '</a>'); ?>

    <!--eof Product artists url and image -->

    <!--bof record company url and image -->
    <?php
    if (zen_not_null($products_record_company_url)) {
    if ($flag_show_product_music_info_record_company == 1) {
    ?>
    <p id="productInfoLink" class="productMusic centeredContent">For more information, you can visit the <a href=<?php echo sprintf(TEXT_RECORD_COMPANY_URL, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_record_company_url), 'NONSSL', true, false)); ?> >webpage</a> of manufacturer.</p>
    <?php
    }// $flag_show_product_info_record_company
    }
    ?>
    <?php echo sprintf('<a href="' . TEXT_RECORD_COMPANY_URL, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_record_company_url), 'NONSSL', true, false) . '">' . zen_image(DIR_WS_IMAGES . $record_company->fields['record_company_image']) . '</a>'); ?>

    <!--eof Product URL -->


    so: I repeated the same principle of record company for the artists, but for record company it displays image of respected record company,
    for artists: it displays url of artists and the link to his url, also the url of artists is on the artists image, just there is no image, like the script can not find the image of artist. the """" zen_image(DIR_WS_IMAGES . $record_artists->fields['artists_image']). '</a>'); """"
    comes from the table record_artists where there is a filed of artists_image.
    problem:
    1- image of artists doen't displayed.
    2- when I install lichtbox addon, the image of product will not more get the function of lichtbox image, even if I add this code to the appropriate file of lichtbox file.

    thanks

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

    Default Re: Record Company image

    This will give you the image:
    PHP Code:
    zen_image(DIR_WS_IMAGES $artist->fields['artists_image']) 
    I am not sure what you are trying to do with the rest of that line as it won't display the image even when you reference it correctly ...
    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: v1.5.5]
    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. #13
    Join Date
    Aug 2006
    Posts
    166
    Plugin Contributions
    2

    Default Re: Record Company image

    Quote Originally Posted by Ajeh View Post
    This will give you the image:
    PHP Code:
    zen_image(DIR_WS_IMAGES $artist->fields['artists_image']) 
    I am not sure what you are trying to do with the rest of that line as it won't display the image even when you reference it correctly ...
    I did your changes, still no image; I don't know why you wrote this address for image, but the table is like this:

    ************
    Table structure for table `record_artists`
    --

    CREATE TABLE `record_artists` (
    `artists_id` int(11) NOT NULL auto_increment,
    `artists_name` varchar(32) NOT NULL default '',
    `artists_image` varchar(64) default NULL,
    `date_added` datetime default NULL,
    `last_modified` datetime default NULL,
    PRIMARY KEY (`artists_id`),
    KEY `idx_rec_artists_name_zen` (`artists_name`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

    --
    -- Dumping data for table `record_artists`
    --

    INSERT INTO `record_artists` (`artists_id`, `artists_name`, `artists_image`, `date_added`, `last_modified`) VALUES
    (1, 'The Russ Tippins Band', 'category_dvd_movies.gif', '2004-06-01 20:53:00', '2008-08-09 22:13:47'),
    (2, 'Alphaveto', 'Importers_Distributors/Zonsondergang.jpg', '2008-08-09 01:04:03', '2008-08-10 15:48:19'),
    (3, 'Trovet', 'countrychart_20402.jpg', '2008-08-09 01:04:24', '2008-08-10 14:47:36');


    ************

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

    Default Re: Record Company image

    While the table may be written one way ... the available variables, contants and arrays can change from place to place ...

    On the tpl_product_music_info_display.php you need to look into the files in the pages for the:
    /includes/modules/pages/product_music_info

    to see what is available to you ...

    If you look in the main_template_vars_product_type.php you will see that that table is referenced with:
    PHP Code:
        $sql "select * from " TABLE_RECORD_ARTISTS "
                where artists_id = '" 
    $music_extras->fields['artists_id'] . "'";

        
    $artist $db->Execute($sql); 
    So now you want from the record_artists table the field for the artists_image which is available with:
    $artist->fields['artists_image']

    Paste this into your tpl_product_music_info_display.php and see what happens:
    PHP Code:
    <?php echo 'I SEE: ' zen_image(DIR_WS_IMAGES $artist->fields['artists_image']) . ' I do NOT SEE: ' sprintf('<a href="' TEXT_ARTIST_IMAGE_URLzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_artist_url), 'NONSSL'truefalse) . '">' zen_image(DIR_WS_IMAGES $artist->fields['artists_image']). '</a>'); ?>
    You will see that one reference works and the other fails ... you need to fix whatever it is you think you want to have happened to the displayed image ...
    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: v1.5.5]
    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!

  5. #15
    Join Date
    Aug 2006
    Posts
    166
    Plugin Contributions
    2

    Default Re: Record Company image

    Quote Originally Posted by Ajeh View Post
    While the table may be written one way ... the available variables, contants and arrays can change from place to place ...

    On the tpl_product_music_info_display.php you need to look into the files in the pages for the:
    /includes/modules/pages/product_music_info

    to see what is available to you ...

    If you look in the main_template_vars_product_type.php you will see that that table is referenced with:
    PHP Code:
        $sql "select * from " TABLE_RECORD_ARTISTS "
                where artists_id = '" 
    $music_extras->fields['artists_id'] . "'";

        
    $artist $db->Execute($sql); 
    So now you want from the record_artists table the field for the artists_image which is available with:
    $artist->fields['artists_image']

    Paste this into your tpl_product_music_info_display.php and see what happens:
    PHP Code:
    <?php echo 'I SEE: ' zen_image(DIR_WS_IMAGES $artist->fields['artists_image']) . ' I do NOT SEE: ' sprintf('<a href="' TEXT_ARTIST_IMAGE_URLzen_href_link(FILENAME_REDIRECT'action=url&goto=' urlencode($products_artist_url), 'NONSSL'truefalse) . '">' zen_image(DIR_WS_IMAGES $artist->fields['artists_image']). '</a>'); ?>
    You will see that one reference works and the other fails ... you need to fix whatever it is you think you want to have happened to the displayed image ...
    Hi Ajeh
    It works now, your code is the same as your last advise, but it works now !!! to be honest, I spent more than 4 hours wihout results, thank you very much. it is very strange that lichtbox module or zwap image works on all products excepyt of music products. any idea for it ?

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

    Default Re: Record Company image

    Sorry I do not use it ... but glad to hear that this is working for you now ...
    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: v1.5.5]
    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!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Adding description to Record Company or Record Artist
    By koesbong in forum General Questions
    Replies: 3
    Last Post: 21 Apr 2009, 04:25 AM
  2. Show record company in product listing
    By taguchi_isara in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Dec 2007, 10:13 AM
  3. artist and record company
    By amopro in forum General Questions
    Replies: 0
    Last Post: 3 Feb 2007, 10:02 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