Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Druckvorschau Textfarbeändern

    zotty

    • Frisch an Board
    • Beiträge: 65
    Druckvorschau Textfarbeändern
    am: 22. Februar 2013, 13:28:45
    Hallo liebe Leute,
    Folgendes Problem. Ich habe auf meiner ganzen Seite die Texte weiss eingestellt über body im stylesheet.

    Dem zufolge ist natürlich in der Druckansicht des jeweiligen Artikels der Text auch weiss.

    Vielleicht gibt es hier ja ein pfiffigen HTML/CSSler der vielleicht wüsste was ich ändern muss.

    Vielen Dank

    Linkback: https://www.modified-shop.org/forum/index.php?topic=24929.0

    jannemann

    • modified Team
    • Beiträge: 6.275
    • Geschlecht:
    Re: Druckvorschau Textfarbeändern
    Antwort #1 am: 22. Februar 2013, 13:39:34
    Hallo zotty,

    hast du mal mit Firebug für Firefox die betroffene Stelle untersucht?
    Eigentlich solltest du da fündig werden :-)

    Schöne Grüße,
    Jan

    zotty

    • Frisch an Board
    • Beiträge: 65
    Re: Druckvorschau Textfarbeändern
    Antwort #2 am: 22. Februar 2013, 14:16:59
    ja klar aber es verweisst mich nur auf die datei print_product_info.php

    Code: PHP  [Auswählen]
    p

    /* -----------------------------------------------------------------------------------------
       $Id$

       modified eCommerce Shopsoftware - community made shopping
       http://www.modified eCommerce Shopsoftware.org

       Copyright (c) 2010 modified eCommerce Shopsoftware
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(product_info.php,v 1.94 2003/05/04); www.oscommerce.com
       (c) 2003   nextcommerce (print_product_info.php,v 1.16 2003/08/25); www.nextcommerce.org
       (c) 2006 XT-Commerce

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    include ('includes/application_top.php');

    // include needed functions
    require_once (DIR_FS_INC.'xtc_get_products_mo_images.inc.php');
    require_once (DIR_FS_INC.'xtc_get_vpe_name.inc.php');

    $smarty = new Smarty;
    //BOF - web28 - 2010-07-09 - define smarty template path
    $smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
    //EOF - web28 - 2010-07-09 - define smarty template path

    //BOF - web28 - 2010-08-13 - define missing charset
    $smarty->assign('charset', $_SESSION['language_charset'] );
    //EOF - web28 - 2010-08-13 - define missing charset

    $product_info_query = xtc_db_query("select * 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 = xtc_db_fetch_array($product_info_query);

    $products_price = $xtPrice->xtcGetPrice($product_info['products_id'], $format = true, 1, $product_info['products_tax_class_id'], $product_info['products_price'], 1);

    $products_attributes_query = xtc_db_query("select count(*) as total from ".TABLE_PRODUCTS_OPTIONS." popt, ".TABLE_PRODUCTS_ATTRIBUTES." patrib where patrib.products_id='".(int) $_GET['products_id']."' and patrib.options_id = popt.products_options_id and popt.language_id = '".(int) $_SESSION['languages_id']."'");
    $products_attributes = xtc_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
            $products_options_name_query = xtc_db_query("select distinct popt.products_options_id, popt.products_options_name from ".TABLE_PRODUCTS_OPTIONS." popt, ".TABLE_PRODUCTS_ATTRIBUTES." patrib where patrib.products_id='".(int) $_GET['products_id']."' and patrib.options_id = popt.products_options_id and popt.language_id = '".(int) $_SESSION['languages_id']."' order by popt.products_options_name");
            while ($products_options_name = xtc_db_fetch_array($products_options_name_query)) {
                    $selected = 0;

                    $products_options_query = xtc_db_query("select pov.products_options_values_id,
                                                                                                    pov.products_options_values_name,
                                                                                                    pa.options_values_price,
                                                                                                    pa.price_prefix,pa.attributes_stock,
                                                                                                    pa.attributes_model
                                                                                                    from "
    .TABLE_PRODUCTS_ATTRIBUTES." pa,
                                                                                                    "
    .TABLE_PRODUCTS_OPTIONS_VALUES." pov
                                                                                                    where pa.products_id = '"
    .(int) $_GET['products_id']."'
                                                                                                    and pa.options_id = '"
    .$products_options_name['products_options_id']."'
                                                                                                    and pa.options_values_id = pov.products_options_values_id
                                                                                                    and pov.language_id = '"
    .(int) $_SESSION['languages_id']."'
                                                                                                    order by pa.sortorder"
    );
                    while ($products_options = xtc_db_fetch_array($products_options_query)) {
                            $module_content[] = array ('GROUP' => $products_options_name['products_options_name'], 'NAME' => $products_options['products_options_values_name']);

                            if ($products_options['options_values_price'] != '0') {

                                    if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) {
                                            $tax_rate = $xtPrice->TAX[$product_info['products_tax_class_id']];
                                            $products_options['options_values_price'] = xtc_add_tax($products_options['options_values_price'], $xtPrice->TAX[$product_info['products_tax_class_id']]);
                                    }
                                    if ($_SESSION['customers_status']['customers_status_show_price'] == 1) {
                                            $module_content[sizeof($module_content) - 1]['NAME'] .= ' ('.$products_options['price_prefix'].$xtPrice->xtcFormat($products_options['options_values_price'], true,0,true).')';
                                    }
                            }
                    }
            }
    }

    // assign language to template for caching
    $smarty->assign('language', $_SESSION['language']);

    // BOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
    /*
    $image = '';
    if ($product_info['products_image'] != '') {
            $image = DIR_WS_CATALOG.DIR_WS_THUMBNAIL_IMAGES.$product_info['products_image'];
    }
    */

    //BOF - web28 - 2010-07-09 - image path corection
    //$image = DIR_WS_CATALOG.$product->productImage($product_info['products_image'], 'thumbnail');
    $image = $product->productImage($product_info['products_image'], 'thumbnail');
    //EOF - web28 - 2010-07-09 - image path corection
    // EOF - Tomcraft - 2009-10-30 - noimage.gif is displayed, when no image is defined
    if ($_SESSION['customers_status']['customers_status_show_price'] != 0) {
            $tax_rate = $xtPrice->TAX[$product_info['products_tax_class_id']];
            // price incl tax
            if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
                    $smarty->assign('PRODUCTS_TAX_INFO', sprintf(TAX_INFO_INCL, $tax_rate.' %'));
            }
            // excl tax + tax at checkout
            if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
                    $smarty->assign('PRODUCTS_TAX_INFO', sprintf(TAX_INFO_ADD, $tax_rate.' %'));
            }
            // excl tax
            if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) {
                    $smarty->assign('PRODUCTS_TAX_INFO', sprintf(TAX_INFO_EXCL, $tax_rate.' %'));
            }
    }
    $smarty->assign('PRODUCTS_NAME', $product_info['products_name']);
    $smarty->assign('PRODUCTS_EAN', $product_info['products_ean']);
    $smarty->assign('PRODUCTS_QUANTITY', $product_info['products_quantity']);
    $smarty->assign('PRODUCTS_WEIGHT', $product_info['products_weight']);
    $smarty->assign('PRODUCTS_STATUS', $product_info['products_status']);
    $smarty->assign('PRODUCTS_ORDERED', $product_info['products_ordered']);
    $smarty->assign('PRODUCTS_MODEL', $product_info['products_model']);
    $smarty->assign('PRODUCTS_DESCRIPTION', $product_info['products_description']);
    $smarty->assign('PRODUCTS_IMAGE', $image);
    $smarty->assign('PRODUCTS_PRICE', $products_price['formated']);
    if (ACTIVATE_SHIPPING_STATUS == 'true') {
            $smarty->assign('SHIPPING_NAME', $main->getShippingStatusName($product_info['products_shippingtime']));
            if ($shipping_status['image'] != '')
                    $smarty->assign('SHIPPING_IMAGE', $main->getShippingStatusImage($product_info['products_shippingtime']));
    }
    if (SHOW_SHIPPING == 'true')
    //BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable
            //$smarty->assign('PRODUCTS_SHIPPING_LINK', ' '.SHIPPING_EXCL.'<a href="javascript:newWin=void(window.open(\''.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS).'\', \'popup\', \'toolbar=0, width=640, height=600\'))"> '.SHIPPING_COSTS.'</a>');
            $smarty->assign('PRODUCTS_SHIPPING_LINK', ' '.SHIPPING_EXCL.'<a href="javascript:newWin=void(window.open(\''.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS).'\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\'))"> '.SHIPPING_COSTS.'</a>');
    //EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable

    $discount = 0.00;
    if ($_SESSION['customers_status']['customers_status_public'] == 1 && $_SESSION['customers_status']['customers_status_discount'] != '0.00') {
            $discount = $_SESSION['customers_status']['customers_status_discount'];
            if ($product_info['products_discount_allowed'] < $_SESSION['customers_status']['customers_status_discount'])
                    $discount = $product_info['products_discount_allowed'];
            if ($discount != '0.00')
                    $smarty->assign('PRODUCTS_DISCOUNT', $discount.'%');
    }

    if ($product_info['products_vpe_status'] == 1 && $product_info['products_vpe_value'] != 0.0 && $products_price['plain'] > 0)
            $smarty->assign('PRODUCTS_VPE', $xtPrice->xtcFormat($products_price['plain'] * (1 / $product_info['products_vpe_value']), true).TXT_PER.xtc_get_vpe_name($product_info['products_vpe']));
    $smarty->assign('module_content', $module_content);

    //more images - by Novalis
    $mo_images = xtc_get_products_mo_images($product_info['products_id']);
    if (is_array($mo_images)) {
      //BOF MORE IMAGES ARRAY
            $more_images_data = array();
            foreach ($mo_images as $img) {
                //BOF - web28 - 2010-07-09 - image path corection
                    //$mo_img = DIR_WS_CATALOG.DIR_WS_THUMBNAIL_IMAGES.$img['image_name'];
                    $mo_img = DIR_WS_THUMBNAIL_IMAGES.$img['image_name'];
                    $smarty->assign('PRODUCTS_IMAGE_'.$img['image_nr'], $mo_img);
                    //$more_images_data[] = array ('PRODUCTS_IMAGE' => DIR_WS_CATALOG.DIR_WS_THUMBNAIL_IMAGES.$img['image_name']);
                    $more_images_data[] = array ('PRODUCTS_IMAGE' => DIR_WS_THUMBNAIL_IMAGES.$img['image_name']);
                    //EOF - web28 - 2010-07-09 - image path corection
            }
            $smarty->assign('more_images', $more_images_data);
            //EOF MORE IMAGES ARRAY
    }

    // set cache ID
     if (!CacheCheck()) {
            $smarty->caching = 0;
    } else {
            $smarty->caching = 1;
            $smarty->cache_lifetime = CACHE_LIFETIME;
            $smarty->cache_modified_check = CACHE_CHECK;
    }
    $cache_id = $_SESSION['language'].'_'.$product_info['products_id'];

    $smarty->display(CURRENT_TEMPLATE.'/module/print_product_info.html', $cache_id);
    ?>

    naja und weiterhin verweisst es mir in der stylesheet.css auf den body aber in der body steht ja auch der Farbcode für weiss. aber ich möchte es ja nur für die Artikelvorschau bessergesagt druckvorschau ändern nicht für die ganze Seite

    Gradler

    • Viel Schreiber
    • Beiträge: 2.083
    • Geschlecht:
    Re: Druckvorschau Textfarbeändern
    Antwort #3 am: 22. Februar 2013, 14:28:13
    Such mal nach print.css oder so ähnlich. Irgend jemand hat mal letztes Jahr eine Verbesserung für die Druckgeschichte veröffentlicht. Fällt mir nur auf die Schnelle nicht mehr ein wer das war.

    Gerd

    sv.brueck

    • Fördermitglied
    • Beiträge: 524
    Re: Druckvorschau Textfarbeändern
    Antwort #4 am: 22. Februar 2013, 14:28:53
    Hallo zotty,

    den CSS-Code für die Druckansicht findest Du in der Zeile 703. Dort steht folgendes:

    Code: CSS  [Auswählen]
    body.popupproductinfo {
        background: none repeat scroll 0 0 #FFFFFF;
        padding: 15px;
    }

    Gruß

    Sven

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Druckvorschau Textfarbeändern
    Antwort #5 am: 22. Februar 2013, 14:37:28
    Und um das beim Ausdruck zu ändern am Ende einfügen:
    Code: CSS  [Auswählen]
    @media print {
            body.popupproductinfo {
                    background: #FFF;
                    color: #000;
            }
    }

    zotty

    • Frisch an Board
    • Beiträge: 65
    Re: Druckvorschau Textfarbeändern
    Antwort #6 am: 22. Februar 2013, 14:43:49
    okay hat soweit alles funktioniert vielen Dank jetzt ist nur das Problem das der Artikel Name immernoch weiss ist, da er über den befehl "h1" geschrieben wurde und der in der css auch weiss ist ... kann man das ändern oder nicht?

    genauso ähnlich sieht es für die überschriften Optionen und Preis aus

    Matt

    • Experte
    • Beiträge: 4.241
    Re: Druckvorschau Textfarbeändern
    Antwort #7 am: 22. Februar 2013, 15:20:39
    Einfach weitere Regeln im entsprechenden @media hinzufügen. Spezifität analog den normalen Regeln geben oder !important verwenden.
    1 Antworten
    1749 Aufrufe
    10. April 2013, 22:44:08 von Marcel G.
    1 Antworten
    2363 Aufrufe
    09. Juli 2010, 10:07:00 von Tomcraft
    6 Antworten
    3798 Aufrufe
    04. Januar 2011, 08:13:06 von HuKa-Tierwelt
    7 Antworten
    2868 Aufrufe
    04. März 2015, 09:49:19 von sunghost
               
    anything