Page 33 of 39 FirstFirst ... 233132333435 ... LastLast
Results 321 to 330 of 381
  1. #321
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

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

    Remove the following code from admin/includes/modules/new_product_preview.php:

    //extra fields mod


    if ($_POST['file_1_title'] != '') {
    $products_file_1 = new upload('file_1');
    $products_file_1->set_destination(DIR_FS_PRODUCT_EXTRA);
    if ($products_file_1->parse() && $products_file_1->save(true)) {
    $products_file_1_name = $products_file_1->filename;
    } else {
    $products_file_1_name = (isset($_POST['previous_file_1']) ? $_POST['previous_file_1'] : '');
    }
    }

    if ($_POST['file_2_title'] != '') {
    $products_file_2 = new upload('file_2');
    $products_file_2->set_destination(DIR_FS_PRODUCT_EXTRA);
    if ($products_file_2->parse() && $products_file_2->save(true)) {
    $products_file_2_name = $products_file_2->filename;
    } else {
    $products_file_2_name = (isset($_POST['previous_file_2']) ? $_POST['previous_file_2'] : '');
    }
    }

    if ($_POST['file_3_title'] != '') {
    $products_file_3 = new upload('file_3');
    $products_file_3->set_destination(DIR_FS_PRODUCT_EXTRA);
    if ($products_file_3->parse() && $products_file_3->save(true)) {
    $products_file_3_name = $products_file_3->filename;
    } else {
    $products_file_3_name = (isset($_POST['previous_file_3']) ? $_POST['previous_file_3'] : '');
    }
    }

    if ($_POST['file_4_title'] != '') {
    $products_file_4 = new upload('file_4');
    $products_file_4->set_destination(DIR_FS_PRODUCT_EXTRA);
    if ($products_file_4->parse() && $products_file_4->save(true)) {
    $products_file_4_name = $products_file_4->filename;
    } else {
    $products_file_4_name = (isset($_POST['previous_file_4']) ? $_POST['previous_file_4'] : '');
    }
    }
    if ($_POST['video_title'] != '') {
    $products_video = new upload('video');
    $products_video->set_destination(DIR_FS_PRODUCT_EXTRA);;
    if ($products_video->parse() && $products_video->save(true)) {
    $products_video_name = $products_video->filename;
    } else {
    $products_video_name = (isset($_POST['previous_video']) ? $_POST['previous_video'] : '');
    }
    }

    ?>
    and change the following (was highlighted in Diffmerge)

    if (!isset($_GET['read']) || $_GET['read'] == 'only') {
    $products_image = new upload('products_image');
    $products_image->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
    if ($products_image->parse() && $products_image->save($_POST['overwrite'])) {
    $products_image_name = $_POST['img_dir'] . $products_image->filename;
    } else {
    $products_image_name = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
    }
    to this (I can't see any difference):

    if (!isset($_GET['read']) || $_GET['read'] == 'only') {
    $products_image = new upload('products_image');
    $products_image->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
    if ($products_image->parse() && $products_image->save($_POST['overwrite'])) {
    $products_image_name = $_POST['img_dir'] . $products_image->filename;
    } else {
    $products_image_name = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
    }
    Last edited by Parafanaylya; 29 Jul 2015 at 09:21 AM.

  2. #322
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

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

    remove from admin/includes/modules/update_product.php

    //extra product fields
    $tmp_value = zen_db_prepare_input($_POST['text_1']);
    $text_1 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_2']);
    $text_2 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_3']);
    $text_3 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_4']);
    $text_4 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_1']);
    $file_1 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_2']);
    $file_2 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_3']);
    $file_3 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_4']);
    $file_4 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_1_title']);
    $file_1_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_2_title']);
    $file_2_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_3_title']);
    $file_3_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_4_title']);
    $file_4_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['video']);
    $video = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['video_title']);
    $video_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['extra_field']);
    $extra_field = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['height']);
    $height = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['width']);
    $width = ($tmp_value=='') ? "null" : $tmp_value;

    $sql_data_array = array('products_id' => $products_id,
    'extra_field' => $extra_field,
    'text_1' => $text_1,
    'text_2' => $text_2,
    'text_3' => $text_3,
    'text_4' => $text_4,
    'video_title' => $video_title,
    'file_1' => $file_1,
    'file_2' => $file_2,
    'file_3' => $file_3,
    'file_4' => $file_4,
    'file_1_title' => $file_1_title,
    'file_2_title' => $file_2_title,
    'file_3_title' => $file_3_title,
    'file_4_title' => $file_4_title,
    'video' => $video,
    'height' => $height,
    'width' => $width
    );

    zen_db_perform(TABLE_PRODUCT_EXTRA_FIELDS, $sql_data_array);
    &

    //extra product fields
    $tmp_value = zen_db_prepare_input($_POST['extra_field']);
    $extra_field = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_1']);
    $text_1 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_2']);
    $text_2 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_3']);
    $text_3 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['text_4']);
    $text_4 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_1']);
    $file_1 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_2']);
    $file_2 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_3']);
    $file_3 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_4']);
    $file_4 = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_1_title']);
    $file_1_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_2_title']);
    $file_2_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_3_title']);
    $file_3_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['file_4_title']);
    $file_4_title = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['video']);
    $video = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['video_title']);
    $video_title = ($tmp_value=='') ? "null" : $tmp_value;

    $tmp_value = zen_db_prepare_input($_POST['height']);
    $height = ($tmp_value=='') ? "null" : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['width']);
    $width = ($tmp_value=='') ? "null" : $tmp_value;



    $sql_data_array = array('extra_field' => $extra_field,
    'text_1' => $text_1,
    'text_2' => $text_2,
    'text_3' => $text_3,
    'text_4' => $text_4,
    'file_1' => $file_1,
    'file_2' => $file_2,
    'file_3' => $file_3,
    'file_4' => $file_4,
    'file_1_title' => $file_1_title,
    'file_2_title' => $file_2_title,
    'file_3_title' => $file_3_title,
    'file_4_title' => $file_4_title,
    'video' => $video,
    'video_title' => $video_title,
    'height' => $height,
    'width' => $width

    );

    zen_db_perform(TABLE_PRODUCT_EXTRA_FIELDS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");

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

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

    You are making this very hard when it is not.

    There are only a few files in the upload for this mod. All you have to do is grab those same files from the default 1.5.4 and upload them. Look at the readme for a list.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  4. #324
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

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

    Thanks so much Delia. I am a novice - and learning on the fly. I was in a bit of a panic.

  5. #325
    Join Date
    Jul 2005
    Location
    Hoedspruit
    Posts
    530
    Plugin Contributions
    2

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

    Sorted :)

    Would you be interested in trying it out with temporary access?

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

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

    What do you mean try it out?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #327
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

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

    hello thanks for your mod, I installed successfully in fact I see in admin, but i insert values and they don't appear on product page.
    I have ZC 1.5.4

    I upload every folder (included tabproductsv1.10) under my site, and I run the .sql correctly, but the only problem is that don't appear on product page, in admin appears correctly.

    Please, thanks in advance Name:  image.jpg
Views: 127
Size:  30.0 KB

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

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

    Did you change the template folder name to the name of your custom template?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  9. #329
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

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

    yes obviously
    It is a demo site, in which I charge a test product, if you want to see the link is
    www_giocattoliamo_it/prova
    and in home page there is the test product
    thanks

  10. #330
    Join Date
    May 2007
    Location
    Italy
    Posts
    438
    Plugin Contributions
    0

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

    if you want i can give to you data access in some way, I would need of this mod please

 

 
Page 33 of 39 FirstFirst ... 233132333435 ... 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