Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    31
    Plugin Contributions
    0

    Idea or Suggestion Voluntary self-control of the film economy for ZC 1.3.7

    Hello to everything,
    I urgently needs your help.

    I try Voluntary self-control of for ZC 1.3.7 the film economy to provide. There is an older version for ZC 1.2.6 (Zen_FSK18_v_2.0_zen1.2.6d), but, unfortunately, it does not function with ZC 1.3.7 were
    able to do to me somebody help this Script to circumscribe, because my PhP is not so good.

    I have inserted a field in New Product with the name FSK status. If I give a number in this field, should be indicated in product_info a suitable picture and text.

    For it I have inserted the following:


    In admin/includes/modules/product/collect_info.php

    in ca. Zeile 17 nach

    'products_quantity' => '',

    folgendes ein:


    'products_fsk_18' => '',


    suche folgende Zeile ca. 47 - 64

    if (isset($_GET['pID']) && empty($_POST)) {

    ersetzte mit:

    if (isset($_GET['pID']) && empty($_POST)) {
    $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,
    p.products_id, p.products_quantity, p.products_model,
    p.products_image, p.products_price, p.products_virtual, p.products_weight,
    p.products_date_added, p.products_last_modified,
    date_format(p.products_date_available, '%Y-%m-%d') as
    products_date_available, p.products_status, p.products_fsk_18, p.products_tax_class_id,
    p.manufacturers_id,
    p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
    p.product_is_free, p.product_is_call, p.products_quantity_mixed,
    p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,
    p.products_sort_order,
    p.products_discount_type, p.products_discount_type_from,
    p.products_price_sorter, p.master_categories_id
    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
    where p.products_id = '" . (int)$_GET['pID'] . "'
    and p.products_id = pd.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");

    suche Zeile 281 und füge folgendes ein:

    <td class="main"><?php echo TEXT_PRODUCTS_FSK_18; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_fsk_18', $pInfo->products_fsk_18); ?></td>
    <tr>
    <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    </tr>

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

    In admin/includes/languages/german/product.php

    suche folgende Zeile:

    define('TEXT_PRODUCTS_STATUS', 'Artikelstatus:');

    folgende ein:

    define('TEXT_PRODUCTS_FSK_18', 'FSK 18 Status:');

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

    In admin/includes/languages/german/products_price_manager.php
    in Zeile 39 einf&#252;gen:

    define('TEXT_PRODUCTS_FSK_18', 'FSK 18 Status:');

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

    In admin/includes/modules/update_product.php
    in Zeile 37 einf&#252;gen:

    //FSK 18
    'products_fsk_18' => zen_db_prepare_input($_POST['products_fsk_18']),
    //FSK 18 EOF

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

    In includes/languages/german.php
    Scrollt an das Ende der Datei und f&#252;gt VOR

    ?>

    folgendes ein:


    // FSK Anzeige
    define('TEXT_FSK_STATUS_1', 'Ohne Altersbeschr&auml;nkung');
    define('TEXT_FSK_STATUS_6', 'Freigegeben ab 6 Jahre');
    define('TEXT_FSK_STATUS_12', 'Freigegeben ab 12 Jahre');
    define('TEXT_FSK_STATUS_16', 'Freigegeben ab 16 Jahre');
    define('TEXT_FSK_STATUS_18', 'Freigegeben ab 18 Jahre');
    define('TEXT_FSK_STATUS_0', 'noch keine Altersfreigabe bekannt');

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

    In includes/functions/functions_general.php
    Scrollt an das Ende der Datei und f&#252;gt VOR

    /////////////////////////////////////////////
    ////
    // call additional function files
    // prices and quantities

    folgendes ein:


    // START FSK Anzeige
    function picto_fsk_18($products_fsk_18=0) {
    if ($products_fsk_18 <=1 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_0.gif', TEXT_FSK_STATUS_1).'<br>'. TEXT_FSK_STATUS_1 ;
    }
    if ($products_fsk_18 <=6 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_6.gif', TEXT_FSK_STATUS_6 ).'<br>'. TEXT_FSK_STATUS_6 ;
    }
    if ($products_fsk_18 <=12 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_12.gif', TEXT_FSK_STATUS_12).'<br>'. TEXT_FSK_STATUS_12 ;
    }
    if ($products_fsk_18 <=16 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_16.gif', TEXT_FSK_STATUS_16).'<br>'. TEXT_FSK_STATUS_16 ;
    }
    if ($products_fsk_18 <=18 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_18.gif', TEXT_FSK_STATUS_18).'<br>'. TEXT_FSK_STATUS_18 ;
    }
    if ($products_fsk_18 <=0 ) { $picto = zen_image(DIR_WS_IMAGES . '/fsk/' . 'usk_tba.gif', TEXT_FSK_STATUS_0) . '<br>' . TEXT_FSK_STATUS_0 ;
    }
    return $picto;
    }
    // ENDE FSK Anzeige

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

    In includes/templates/template_default/templates/tpl_product_info_display.php
    Solltet ihr ein eigenes Template angelegt haben &#246;ffnet die Datei entsprechend in eurem Template

    Suche die Zeile

    <!--eof Product Price block -->

    folgendes ein:

    <!--bof FSK Status-->
    <h4 id="products_fsk_18"><?php echo picto_fsk_18($products_fsk_18); ?></h4>
    <!--eof FSK Status-->

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

    In includes/index_filters/default_filter.php
    nach der Zeile 28 - 85

    // We are asked to show only a specific category

    folgendes damit ab&#228;ndern:

    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_fsk_18, pd.products_description, if(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id , " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_status = 1
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$_GET['filter_id'] . "'" .
    $alpha_sort;
    } else {
    // We show them all
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_fsk_18, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m
    where p.products_status = 1
    and pd.products_id = p.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
    $alpha_sort;
    }
    } else {
    // show the products in a given category
    if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id'])) {
    // We are asked to show only specific category
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_fsk_18, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .
    TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_MANUFACTURERS . " m, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_status = 1
    and p.manufacturers_id = m.manufacturers_id
    and m.manufacturers_id = '" . (int)$_GET['filter_id'] . "'
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $alpha_sort;
    } else {
    // We show them all
    $listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_fsk_18, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
    from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p2c.products_id = s.products_id
    where p.products_status = 1
    and p.products_id = p2c.products_id
    and pd.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = '" . (int)$current_category_id . "'" .
    $alpha_sort;
    }
    }



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

    In includes/modules/new_products.php
    Suche die Zeile 18 - 21

    if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
    $new_products_query =

    mit folgendes ersetzen:

    if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
    $new_products_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_date_added, p.products_fsk_18
    from " . TABLE_PRODUCTS . " p
    where p.products_status = 1 " . $display_limit;

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

    In includes/modules/pages/product_info/main_template_vars.php
    suche Zeile ca. 114

    $products_quantity = $product_info->fields['products_quantity'];

    folgendes danach einf&#252;gen:

    $products_fsk_18 = $product_info->fields['products_fsk_18'];

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

    Database field:


    INSERT INTO products (products_FSK_18 float NOT NULL default,


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

    I can give the number, however, unfortunately, I get a wrong picture as well as a wrong text indicated.

    Here the link in him you can look this:

    http://www.23093.webhosting0.1blu.de...&products_id=1

    I know I have here somewhere a mistake in it. Can somebody help me please that in the shop the right picture and text is indicated if I give my number in New Product?

    Many thanks!

    greeting Lissy

    Sorry the Shop is in German!!! :-)
    ZenCart Version 1.3.7 and ZenCart Version 1.3.8

    Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Sorry, but I'm having trouble following this post. You may find it easier to post your question at http://www.zen-cart.at/index.php?name=MDForum.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    31
    Plugin Contributions
    0

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Quote Originally Posted by kuroi View Post
    Sorry, but I'm having trouble following this post. You may find it easier to post your question at http://www.zen-cart.at/index.php?name=MDForum.

    Hi kuroi,

    I´ve my Problem posted to your Adress, but it´s look like that nobody can´t help me.

    Thats I want to try here!

    I was change the Script

    http://www.zen-cart.at/modules.php?o...=getit&lid=188

    like my post before.

    And know I´ve a mistake in my Script.

    Lissy
    ZenCart Version 1.3.7 and ZenCart Version 1.3.8

    Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    In your database, does the products_fsk_18 field contain the correct data for each product?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    31
    Plugin Contributions
    0

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Quote Originally Posted by DrByte View Post
    In your database, does the products_fsk_18 field contain the correct data for each product?
    yes it does. because if i show the product in Admin I&#180;ve the right number in there.

    But it print in Shop the wrong Picture and text.

    I mean I&#180;ve a mistake in the Script.

    I want to look in my database again and will check it.

    Lissy


    Is is my database :

    products_fsk_18 tinyint (1) no 0

    is this not correct???
    Last edited by Lissy73; 15 Aug 2007 at 08:14 AM.
    ZenCart Version 1.3.7 and ZenCart Version 1.3.8

    Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

  6. #6
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    31
    Plugin Contributions
    0

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Hi me again!

    This is in my database :

    products_fsk_18 tinyint (1) no 0

    is this not correct??? Need I another typ??
    Or need I a secound field for the text??

    Lissy
    ZenCart Version 1.3.7 and ZenCart Version 1.3.8

    Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Near the top of your /includes/modules/pages/product_info/main_template_vars.php, you'll find a block of code similar to the following.

    You'll need to add your products_fsk_18 field, as shown:
    Code:
        $sql = "select p.products_id, pd.products_name,
                      pd.products_description, p.products_model,
                      p.products_quantity, p.products_image,
                      pd.products_url, p.products_price,
                      p.products_tax_class_id, p.products_date_added,
                      p.products_date_available, p.manufacturers_id, p.products_quantity,
                      p.products_weight, p.products_priced_by_attribute, p.product_is_free,
                      p.products_qty_box_status,
                      p.products_fsk_18,
                      p.products_quantity_order_max,
                      p.products_discount_type, p.products_discount_type_from, p.products_sort_order, p.products_price_sorter
               from   " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
               where  p.products_status = '1'
               and    p.products_id = '" . (int)$_GET['products_id'] . "'
               and    pd.products_id = p.products_id
               and    pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    
        $product_info = $db->Execute($sql);
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    31
    Plugin Contributions
    0

    Default Re: Voluntary self-control of the film economy for ZC 1.3.7

    Quote Originally Posted by DrByte View Post
    Near the top of your /includes/modules/pages/product_info/main_template_vars.php, you'll find a block of code similar to the following.


    thx. I´ve found the problem an have make some changes! The Script is finish now.

    You can the Symbol of Voluntary self-control of the film economy show in:

    product_info
    All products
    new products

    incl. text!

    If somebody like to have, please send a Message to me. I´ll send the Script for Download!

    Lissy
    ZenCart Version 1.3.7 and ZenCart Version 1.3.8

    Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

 

 

Similar Threads

  1. v150 Voluntary customer sign up without sale
    By algerdes in forum Managing Customers and Orders
    Replies: 2
    Last Post: 1 Jun 2012, 03:48 AM
  2. v139h Firewall on the our self-managed server
    By meetsek in forum General Questions
    Replies: 8
    Last Post: 29 May 2012, 05:33 PM
  3. option for customer self-verification?
    By mzimmers in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Mar 2010, 11:43 PM
  4. Motorcycle Film site review
    By OneWorldStudios in forum General Questions
    Replies: 0
    Last Post: 30 May 2007, 03:00 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