Page 7 of 39 FirstFirst ... 5678917 ... LastLast
Results 61 to 70 of 381
  1. #61
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    Ok, I found out that it should be added a piece of code in the collect_info.php that is located in admin/includes/modules/product/

    added after line 458 in collect_info.php:

    <!-- addition: editor for extra field -->
    <?php if ($_SESSION['html_editor_preference_status']=="FCKEDITOR") {
    $oFCKeditor = new FCKeditor('extra_field',$pInfo->extra_field) ;
    $oFCKeditor->Value = (isset($extra_field[$languages[$i]['id']])) ? stripslashes($extra_field[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id']) ;
    $oFCKeditor->Width = '99%' ;
    $oFCKeditor->Height = '350' ;
    // $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
    // $oFCKeditor->Create() ;
    $output = $oFCKeditor->CreateHtml() ; echo $output;
    } else { // using HTMLAREA or just raw "source"

    echo zen_draw_textarea_field('extra field', 'soft', '100%', '30', stripslashes($pInfo->extra_field));
    } ?>
    <!-- end of the addition -->

    Otherwise it works but can't get the existing value (extra field text content) in to the editor that it could be actually edited.
    This means that above line
    $oFCKeditor->Value = (isset($extra_field[$languages[$i]['id']])) ? stripslashes($extra_field[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id']) ;

    should be edited and should there be for example zen_get_extra_field instead of zen_get_products_description?
    Then in that case there is no such function and I was trying to build one based on the example of the zen_get_products_description but didn't work out.
    Is this function building necessary or there is another way to give the value for the editor?
    It seems also that the language and product id's should be replaces by the extra_field id, or?

    Elli
    I may be blond but at least I found Zen.

  2. #62
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,360
    Plugin Contributions
    23

    Default Re: Product Extra Fields for text, pdfs and flash

    When using HTMLarea it does appear. No other editor was specifically integrated for this. I'll look into it when I can but since the extra field was done the same as product description, I think the answer lies with FCKeditor instead of with this mod. I would think that ellivir is on the right track.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  3. #63
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    So, this code below seems to be working for adding the FCKeditor for the extra field:

    <!-- addition: editor for extra field -->
    <?php if ($_SESSION['html_editor_preference_status']=="FCKEDITOR") {
    $oFCKeditor = new FCKeditor('extra_field',$pInfo->extra_field) ;
    $oFCKeditor->Value = (isset($extra_field)) ? stripslashes($extra_field) : ($pInfo->extra_field) ;
    $oFCKeditor->Width = '99%' ;
    $oFCKeditor->Height = '350' ;
    // $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
    // $oFCKeditor->Create() ;
    $output = $oFCKeditor->CreateHtml() ; echo $output;
    } else { // using HTMLAREA or just raw "source"

    echo zen_draw_textarea_field('extra field', 'soft', '100%', '30', stripslashes($pInfo->extra_field));
    } ?>
    <!-- end of the addition -->

    Anyhow, please have a look if there is anything "dangerous" in the coding itself. This was merely a result of trial and error in this case, so I can't definitely suggest people to follow this if nobody knows this coding to be correct or proper for its usage. I was able to see the extra field content and update it successfully though.
    I may be blond but at least I found Zen.

  4. #64
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    hello please can I see a demo on this addon in any way?
    or a screenshot?
    please

  5. #65
    Join Date
    Dec 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    The extra fields do not show when the product type used is "music". Did I miss something?

    Thanks for any help.

    Art

  6. #66
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Product Extra Fields for text, pdfs and flash

    "Ok, I found out that it should be added a piece of code in the collect_info.php that is located in admin/includes/modules/product/"

    I believe there will be a set of files for each product type, so you would need to do the whole set of additions and edits for /product_music/ files or whatever the exact folder name is.

  7. #67
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,360
    Plugin Contributions
    23

    Default Re: Product Extra Fields for text, pdfs and flash

    Quote Originally Posted by artmuns View Post
    The extra fields do not show when the product type used is "music". Did I miss something?

    Thanks for any help.

    Art
    In other words this mod is just for the product - general and not the music or documents,etc. It's for a product type = not all products.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  8. #68
    Join Date
    Sep 2008
    Posts
    97
    Plugin Contributions
    0

    Default Extra <li> and extra line of text

    Delia,

    Awesome mod! love it!
    I tried Lat9 "update" to get rid of the extra <li> with no luck so i ended removing the <li> straight from the tpl_product_info_display.php.

    I still got a small issue:
    I got a piece of text saying "TEXT_PRODUCT_MORE_INFO" showing up on top of the extra text field and i can't figure why.
    It's probably so obvious that i can't see it
    From the Developers Tool Kit in the Admin, the only place i found "TEXT_PRODUCT_MORE_INFO" is in the tpl_product_info_display.php file:
    PHP Code:
    <div class="files">
    <?php if(isset($products_file_1_link) || isset($products_file_2_link) || isset($products_file_3_link) || isset($products_file_4_link) || isset($video_file_link) || isset($extra_field)) {
            echo  
    '<div class="filesHead">'.TEXT_PRODUCT_MORE_INFO.'</div><ul>';
              }
    ?>
    How can i get rid of the extra line of text?

    Thanks,

    Damien


    FYI: I moved the extra.field underneath the additional images, the add to cart button, etc...

  9. #69
    Join Date
    Sep 2008
    Posts
    97
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    To those who might have the same problem, i found out a solution to my problem posted above:
    I simply added a definition to my "product_info.php" (the one in includes/languages/MYTEMPLATE/)
    PHP Code:
    define('TEXT_PRODUCT_MORE_INFO''More information: '); 


    Easy enough!

    Damien

  10. #70
    Join Date
    Nov 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: Product Extra Fields for text, pdfs and flash

    HAPPY NEW YEAR from snowy SCOTLAND.

    Thank you so much for all the help.... This is a great mod.

    I seem to have managed to get it to work ... mostly. The only problem that I have is with the upload files. The text is appearing but the file is not. The links point here:

    mydomain.com/Store/product_extra_files//tmp/phpAm4OCf

    Can you shed any light on this? I am sure that it is something very simple.

    Thanks again

    Gillian

 

 
Page 7 of 39 FirstFirst ... 5678917 ... LastLast

Similar Threads

  1. Replies: 1
    Last Post: 10 Sep 2013, 10:09 PM
  2. Can I add two extra fields for inputting time and date delivery wanted?
    By Desjames in forum Managing Customers and Orders
    Replies: 2
    Last Post: 20 Jun 2010, 08:56 PM
  3. Extra pages and flash movie
    By g.nencini in forum General Questions
    Replies: 1
    Last Post: 11 Oct 2009, 11:51 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