Jump to content

Telefon v detajlu objednávky


Zdeněk

Recommended Posts

Zdravim...Chci se zeptat jak přidám telefon zákazníka do detajlu objednávky....Nechci aby se neustále musela otvírat jeho adresa.... Nevim do jakého douboru mám přidat a co přesně...Díky...
Náhled přiložen.

Link to comment
Share on other sites

classes/PaymentModule.php

Najdi:

$data = array(

                       '{firstname}' => $customer->firstname,
                       '{lastname}' => $customer->lastname,
                       '{email}' => $customer->email,
                       '{delivery_company}' => $delivery->company,
                       '{delivery_firstname}' => $delivery->firstname,
                       '{delivery_lastname}' => $delivery->lastname,
                       '{delivery_address1}' => $delivery->address1,
                       '{delivery_address2}' => $delivery->address2,
                       '{delivery_city}' => $delivery->city,
                       '{delivery_postal_code}' => $delivery->postcode,
                       '{delivery_country}' => $delivery->country,
                       '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '',
                       '{delivery_phone}' => $delivery->phone,
                       '{delivery_other}' => $delivery->other,
                       '{invoice_company}' => $invoice->company,
                       '{invoice_firstname}' => $invoice->firstname,
                       '{invoice_lastname}' => $invoice->lastname,
                       '{invoice_address2}' => $invoice->address2,
                       '{invoice_address1}' => $invoice->address1,
                       '{invoice_city}' => $invoice->city,
                       '{invoice_postal_code}' => $invoice->postcode,
                       '{invoice_country}' => $invoice->country,
                       '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
                       '{invoice_phone}' => $invoice->phone,
                       '{invoice_other}' => $invoice->other,
                       '{order_name}' => sprintf("#d", intval($order->id)),
                       '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), intval($order->id_lang), 1),
                       '{carrier}' => (strval($carrier->name) != '0' ? $carrier->name : Configuration::get('PS_SHOP_NAME')),
                       '{payment}' => $order->payment,
                       '{products}' => $productsList,
                       '{discounts}' => $discountsList,
                       '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false, false),
                       '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping+ $order->total_discounts, $currency, false, false),
                       '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false, false),
                       '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false, false),
                       '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false)
                   );



A vlož tam pod toto:

'{delivery_phone}' => $delivery->phone,



Tohle:

'{delivery_phone_mobile}' => $delivery->phone_mobile,



A pod toto:

'{invoice_phone}' => $invoice->phone,



Tohle:

'{invoice_phone_mobile}' => $invoice->phone_mobile,




Pokud chceš vypsat mobilní telefon do potvrzení objednávky, tak mails/cz/order_conf.html

Pod toto:


Tel.: {delivery_phone}



Vlož toto:

Mobil: {delivery_phone_mobile}



A toto:


Tel.: {invoice_phone}



Vlož toto:

Mobil: {delivery_phone_mobile}




Pokud chceš vypsat mobil i v oznámení o nové objednávce, tak v modules/mailalerts/mail/cz/new_order.html.

Přepiš toto:

{delivery_state}
{delivery_phone}



Za toto:

{delivery_state}
{delivery_phone}
{delivery_phone_mobile}



A toto:

{invoice_state}
{invoice_phone}



Na toto:

{invoice_state}
{invoice_phone}
{invoice_phone_mobile}

Link to comment
Share on other sites

Admin/tabs/AdminOrders.php

pod toto:

'.$addressDelivery->country.($addressDelivery->id_state ? ' - '.$deliveryState->name : '').'



vlož toto:

'.(!empty($addressDelivery->phone) ? '
'.$addressDelivery->phone.'
' : '').' 
'.(!empty($addressDelivery->phone_mobile) ? '
'.$addressDelivery->phone_mobile.'
' : '').' 



a pod toto:

'.$addressInvoice->country.($addressInvoice->id_state ? ' - '.$invoiceState->name : '').'



vlož toto:

'.(!empty($addressInvoice->phone) ? '
'.$addressInvoice->phone.'
' : '').' 
'.(!empty($addressInvoice->phone_mobile) ? '
'.$addressInvoice->phone_mobile.'
' : '').' 

Link to comment
Share on other sites

  • 8 months later...
classes/PaymentModule.php

Najdi:

$data = array(

                       '{firstname}' => $customer->firstname,
                       '{lastname}' => $customer->lastname,
                       '{email}' => $customer->email,
                       '{delivery_company}' => $delivery->company,
                       '{delivery_firstname}' => $delivery->firstname,
                       '{delivery_lastname}' => $delivery->lastname,
                       '{delivery_address1}' => $delivery->address1,
                       '{delivery_address2}' => $delivery->address2,
                       '{delivery_city}' => $delivery->city,
                       '{delivery_postal_code}' => $delivery->postcode,
                       '{delivery_country}' => $delivery->country,
                       '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '',
                       '{delivery_phone}' => $delivery->phone,
                       '{delivery_other}' => $delivery->other,
                       '{invoice_company}' => $invoice->company,
                       '{invoice_firstname}' => $invoice->firstname,
                       '{invoice_lastname}' => $invoice->lastname,
                       '{invoice_address2}' => $invoice->address2,
                       '{invoice_address1}' => $invoice->address1,
                       '{invoice_city}' => $invoice->city,
                       '{invoice_postal_code}' => $invoice->postcode,
                       '{invoice_country}' => $invoice->country,
                       '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
                       '{invoice_phone}' => $invoice->phone,
                       '{invoice_other}' => $invoice->other,
                       '{order_name}' => sprintf("#d", intval($order->id)),
                       '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), intval($order->id_lang), 1),
                       '{carrier}' => (strval($carrier->name) != '0' ? $carrier->name : Configuration::get('PS_SHOP_NAME')),
                       '{payment}' => $order->payment,
                       '{products}' => $productsList,
                       '{discounts}' => $discountsList,
                       '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false, false),
                       '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping+ $order->total_discounts, $currency, false, false),
                       '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false, false),
                       '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false, false),
                       '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false)
                   );



A vlož tam pod toto:

'{delivery_phone}' => $delivery->phone,



Tohle:

'{delivery_phone_mobile}' => $delivery->phone_mobile,



A pod toto:

'{invoice_phone}' => $invoice->phone,



Tohle:

'{invoice_phone_mobile}' => $invoice->phone_mobile,




Pokud chceš vypsat mobilní telefon do potvrzení objednávky, tak mails/cz/order_conf.html

Pod toto:


Tel.: {delivery_phone}



Vlož toto:

Mobil: {delivery_phone_mobile}



A toto:


Tel.: {invoice_phone}



Vlož toto:

Mobil: {delivery_phone_mobile}




Pokud chceš vypsat mobil i v oznámení o nové objednávce, tak v modules/mailalerts/mail/cz/new_order.html.

Přepiš toto:

{delivery_state}
{delivery_phone}



Za toto:

{delivery_state}
{delivery_phone}
{delivery_phone_mobile}



A toto:

{invoice_state}
{invoice_phone}



Na toto:

{invoice_state}
{invoice_phone}
{invoice_phone_mobile}



Komu to nejde návod zde:
modules/mailalerts/mailalerts.php

Add line
'{delivery_phone_mobile}' => $delivery->phone_mobile,

Before line
'{delivery_phone}' => $delivery->phone,

Add line
'{invoice_phone_mobile}' => $invoice->phone_mobile,

before line
'{invoice_phone}' => $invoice->phone,

pro email vložit do new_order jen

{email}

Link to comment
Share on other sites

  • 1 year later...

Je nějaké řešení pro verzi 1.4.7.? tam je ten kód takovýto:


  • /* Display adresses : delivery & invoice */

  • echo '<div class="clear"> </div>

  • <div style="float: left">

  • <fieldset style="width: 400px;">

  • <legend><img src="../img/admin/delivery.gif" alt="'.$this->l('Shipping address').'" />'.$this->l('Shipping address').'</legend>

  • <div style="float: right">

  • <a href="?tab=AdminAddresses&id_address='.$addressDelivery->id.'&addaddress&realedit=1&id_order='.$order->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=1' : '').'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'&back='.urlencode($_SERVER['REQUEST_URI']).'"><img src="../img/admin/edit.gif" /></a>

  • <a href="http://maps.google.com/maps?f=q&hl='.$currentLanguage->iso_code.'&geocode=&q='.$addressDelivery->address1.' '.$addressDelivery->postcode.' '.$addressDelivery->city.($addressDelivery->id_state ? ' '.$deliveryState->name: '').'" target="_blank"><img src="../img/admin/google.gif" alt="" class="middle" /></a>

  • </div>

  • '.$this->displayAddressDetail($addressDelivery)

  • .(!empty($addressDelivery->other) ? '<hr />'.$addressDelivery->other.'<br />' : '')

  • .'</fieldset>

  • </div>

  • <div style="float: left; margin-left: 40px">

  • <fieldset style="width: 400px;">

  • <legend><img src="../img/admin/invoice.gif" alt="'.$this->l('Invoice address').'" />'.$this->l('Invoice address').'</legend>

  • <div style="float: right"><a href="?tab=AdminAddresses&id_address='.$addressInvoice->id.'&addaddress&realedit=1&id_order='.$order->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=2' : '').'&back='.urlencode($_SERVER['REQUEST_URI']).'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'"><img src="../img/admin/edit.gif" /></a></div>

  • '.$this->displayAddressDetail($addressInvoice)

  • .(!empty($addressInvoice->other) ? '<hr />'.$addressInvoice->other.'<br />' : '')

  • .'</fieldset>

  • </div>

  • <div class="clear"> </div>';

 

V praxi mi to ukazuej jen pokud je telefon v poli phone, pokud je vyplněn v poli phone_mobile, tak se neukáže. za řešení dík.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Pro Inusku: ahoj, řešil jsem stejný problém a po delším pátrání jsem konečně narazil na řešení;-). Zjistil jsem, že u verze 1.4 a vyšší není třeba žádný kód měnit. Vše lze pohodlně vyřešit v administraci. Stačí se přihlásit do své administrace a v menu Shipping (doprava) klikni v podmenu na Countries (země) a ze seznamu klikni na Českou republiku. Po načtení se ti zobrazí okno s různými údaji, kde najdi okno "Rozvržení adresy" - mělo by tam být něco, jako

 

firstname lastname

company

vat_number

address1

address2

postcode city

Country:name

phone

 

tak pod phone přidej:

phone_mobile

 

 

Pak tedy bude seznam vypadat takto:

 

firstname lastname

company

vat_number

address1

address2

postcode city

Country:name

phone

phone_mobile

 

A nakonec nezapomeň dole kliknout na "ULOŽIT" !!!

 

A to je vše. Nyní když se koukneš v administraci do záložky Orders a klikneš na zákazníka, tak by se pod adresou mělo zobrazit mobilní telefonní číslo. (samozřejmě za předpokladu, že ho zákazník zadal při registraci:-). Pokud obchoduješ jen s Českou republikou, tak stačí pouze toto nastavení. Pokud však obchoduješ se Slovenskem nebo jinou zemí, musíš ručně atribut "phone_mobile" přidat u všech zemí zvlášť.

Tak snad jsem tímto mini návodem pomohl všem, kteří podobný problém be úspěšně řešili přede mnou.

Zdarec

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...