Ticket #1311: Erweiterung des Shops für Anzeige der VPE bei Staffelpreisen.patch

File Erweiterung des Shops für Anzeige der VPE bei Staffelpreisen.patch, 8.8 KB (added by Torsten Riemer, 8 years ago)
  • includes/classes/product.php

     
    401401          $quantity = GRADUATED_PRICE_MAX_VALUE.' '.$staffel[$i]['stk'];
    402402        }
    403403        $vpe = '';
     404        $vpe_unit = '';
     405        $vpe_value = '';
    404406        if (isset($this->data) && $this->data['products_vpe_status'] == 1 && $this->data['products_vpe_value'] != 0.0 && $staffel[$i]['price'] > 0) {
    405407          $vpe = $staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount;
    406408          $vpe = $vpe * (1 / $this->data['products_vpe_value']);
    407409          $vpe = $xtPrice->xtcFormatCurrency($xtPrice->xtcFormat($vpe, false, $this->data['products_tax_class_id']), 0, false).TXT_PER.xtc_get_vpe_name($this->data['products_vpe']);
     410          $vpe_unit = xtc_get_vpe_name($this->data['products_vpe']);
     411          $vpe_value = $this->data['products_vpe_value'];
     412          $vpe_value = number_format($vpe_value, 2, ',', '.');
    408413        }
    409414
    410415        $Pprice = $xtPrice->xtcFormat($staffel[$i]['price'] - $staffel[$i]['price'] / 100 * $discount, false, $this->data['products_tax_class_id']);
     
    422427                                  'FROM_QUANTITY' => GRADUATED_PRICE_MAX_VALUE,
    423428                                  'TO_QUANTITY' => $to_quantity,
    424429                                  'VPE' => $vpe,
     430                                  'VPE_UNIT' => $vpe_unit,
     431                                  'VPE_VALUE' => $vpe_value,
    425432                                  'PRICE' => $xtPrice->xtcFormat($Pprice, true),
    426433                                  'PLAIN_PRICE' => $Pprice,
    427434                                  'PRICE_NETTO' => $Nprice,
  • includes/classes/xtcPrice.php

     
    802802      $special_price = '';
    803803      $from = '';
    804804      $uvp = '';
     805      //
     806          $vpe_query="SELECT pv.products_vpe_name,
     807                         p.products_vpe_value
     808                        FROM " . TABLE_PRODUCTS_VPE . " pv
     809                        JOIN " . TABLE_PRODUCTS . " p
     810                             ON pv.products_vpe_id = p.products_vpe
     811                       WHERE pv.language_id='".(int)$_SESSION['languages_id']."'
     812                         AND p.products_id='".(int)$pID."'";
     813          $vpe_query = xtDBquery($vpe_query);
     814          $vpe = xtc_db_fetch_array($vpe_query,true);
     815          $vpe_unit = $vpe['products_vpe_name'];
     816          $vpe_value = $vpe['products_vpe_value'];
     817          $vpe_value = number_format($vpe_value, 2, ',', '.');
     818          $unit_price = sprintf(UNIT_PRICE, $vpe_value, $vpe_unit);
     819      //
    805820      if (($this->cStatus['customers_status_graduated_prices'] == '1') && ($sQuery['qty'] > 1)) {
    806821        $bestPrice = $this->xtcGetGraduatedPrice($pID, $sQuery['qty']);
    807822        if ($discount) {
     
    849864          'uvp' =>  $uvp,
    850865          'flag' => 'SpecialGraduated',
    851866          'netto' => $Nprice,
    852           'brutto' => $Bprice
     867          'brutto' => $Bprice,
     868          //'vpe_unit' => $vpe_unit,
     869          //'vpe_value' => $vpe_value,
     870          'unit_price' => $unit_price
    853871        );
    854872      }
    855873    } else {
  • lang/english/english.php

     
    467467define('ENTRY_VAT_ERROR', 'The chosen VAT Reg No is not valid or cannot be verified at the moment! Please enter a valid VAT Reg No or leave this field empty.');
    468468define('MSRP','MSRP');
    469469define('YOUR_PRICE','your price ');
    470 define('UNIT_PRICE','unit price ');
     470//define('UNIT_PRICE','unit price ');
     471define('UNIT_PRICE','Price for %s x %s: ');
    471472define('ONLY',' Now only ');
    472473define('FROM','from ');
    473474define('YOU_SAVE','you save ');
  • lang/german/german.php

     
    467467define('ENTRY_VAT_ERROR', 'Die eingegebene USt-IdNr. ist ungültig oder kann derzeit nicht überprüft werden! Bitte geben Sie eine gültige ID ein oder lassen Sie das Feld zunächst leer.');
    468468define('MSRP','UVP');
    469469define('YOUR_PRICE','Ihr Preis ');
    470 define('UNIT_PRICE','Stückpreis ');
     470//define('UNIT_PRICE','Stückpreis ');
     471define('UNIT_PRICE','Preis für %s x %s: ');
    471472define('ONLY',' Jetzt nur ');// DokuMan - Werbung mit durchgestrichenen Statt-Preisen ist zulässig
    472473define('FROM','ab ');
    473474define('YOU_SAVE','Sie sparen ');
  • templates/tpl_modified/module/graduated_price.html

     
    55  <div class="gp_headline">{#heading_text#}</div>
    66  {foreach name=aussen item=module_data from=$module_content}
    77    <div class="gp_box{if $module_data.VPE != ''} vpe{/if}{if ($module_data.VPE != '' && $smarty.foreach.aussen.iteration is div by 2) || ($module_data.VPE == '' && $smarty.foreach.aussen.iteration is div by 3) || $smarty.foreach.aussen.last} last{/if}">
    8       <span class="gp_title">{$module_data.FROM_QUANTITY} {$module_data.PLAIN_QUANTITY} {#unit#}</span>
     8      <span class="gp_title">{$module_data.FROM_QUANTITY} {$module_data.PLAIN_QUANTITY} {*#unit#*}x {$module_data.VPE_VALUE} x {$module_data.VPE_UNIT}</span>
    99      <span class="gp_price">{#pieces#} {$module_data.PRICE}</span>
    1010      {if $module_data.VPE != ''}<span class="gp_vpe">{$module_data.VPE}</span>{/if}
    1111    </div>
  • templates/tpl_modified/module/includes/price_box.html

     
    1616                <span class="graduated_price">
    1717                  <span class="small_price">{$smarty.const.FROM}</span> {$price_data.PRODUCTS_PRICE_OLD_PRICE}
    1818                </span>
    19                 <span class="item_price{if $module_data.PRODUCTS_VPE} with_vpe{/if}"><span class="small_price">{$smarty.const.UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
     19                <span class="item_price{if $module_data.PRODUCTS_VPE} with_vpe{/if}"><span class="small_price">{*$smarty.const.UNIT_PRICE*}{$price_data.PRODUCTS_PRICE_UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
    2020                {* ENDE Produkt Staffelpreis mit Ausgabe ab Preis, Stückpreis *}
    2121              {/if}
    2222            {elseif $price_data.PRODUCTS_PRICE_FLAG == 'NotAllowed'}
  • templates/tpl_modified/module/includes/price_info.html

     
    3131                <span class="graduated_price">
    3232                  {if isset($price_data.PRODUCTS_PRICE_FROM)}<span class="small_price">{$smarty.const.FROM}</span> {/if}{$price_data.PRODUCTS_PRICE_OLD_PRICE}
    3333                </span>
    34                 <span class="item_price"><span class="small_price">{$smarty.const.UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
     34                <span class="item_price"><span class="small_price">{*$smarty.const.UNIT_PRICE*}{$price_data.PRODUCTS_PRICE_UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
    3535                <meta itemprop="price" content="{$price_data.PRODUCTS_PRICE_PLAIN}" />
    3636                {* ENDE Produkt Staffelpreis mit Ausgabe ab Preis, Stückpreis *}
    3737              {/if}
  • templates/tpl_modified/module/includes/price_listing.html

     
    2424                <span class="graduated_price">
    2525                  <span class="small_price">{$smarty.const.FROM}</span> {$price_data.PRODUCTS_PRICE_OLD_PRICE}
    2626                </span>
    27                 <span class="item_price"><span class="small_price">{$smarty.const.UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
     27                <span class="item_price"><span class="small_price">{*$smarty.const.UNIT_PRICE*}{$price_data.PRODUCTS_PRICE_UNIT_PRICE}</span> {$price_data.PRODUCTS_PRICE_SPECIAL_PRICE}</span>
    2828                {* ENDE Produkt Staffelpreis mit Ausgabe ab Preis, Stückpreis *}
    2929              {/if}
    3030            {elseif $price_data.PRODUCTS_PRICE_FLAG == 'NotAllowed'}