Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
commit
9bafc25878
8 files changed
+50
-16
No files matched your search
@@ -60,13 +60,16 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
|
|||||||
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
||||||
$formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' ');
|
$formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$carrier = new Carrier($this->order->id_carrier);
|
||||||
|
$carrier->name = ($carrier->name == '0' ? Configuration::get('PS_SHOP_NAME') : $carrier->name);
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'order' => $this->order,
|
'order' => $this->order,
|
||||||
'order_details' => $this->order_invoice->getProducts(),
|
'order_details' => $this->order_invoice->getProducts(),
|
||||||
'delivery_address' => $formatted_delivery_address,
|
'delivery_address' => $formatted_delivery_address,
|
||||||
'invoice_address' => $formatted_invoice_address,
|
'invoice_address' => $formatted_invoice_address,
|
||||||
'order_invoice' => $this->order_invoice
|
'order_invoice' => $this->order_invoice,
|
||||||
|
'carrier' => $carrier
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->smarty->fetch($this->getTemplate('delivery-slip'));
|
return $this->smarty->fetch($this->getTemplate('delivery-slip'));
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
||||||
&& !empty($address->vat_number)
|
&& !empty($address->vat_number)
|
||||||
&& $address->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
&& $address->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
||||||
|
$carrier = new Carrier($this->order->id_carrier);
|
||||||
|
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'tax_exempt' => $tax_exempt,
|
'tax_exempt' => $tax_exempt,
|
||||||
'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(),
|
'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(),
|
||||||
@@ -98,7 +99,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(),
|
'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(),
|
||||||
'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(),
|
'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(),
|
||||||
'order' => $this->order,
|
'order' => $this->order,
|
||||||
'order_invoice' => $this->order_invoice
|
'order_invoice' => $this->order_invoice,
|
||||||
|
'carrier' => $carrier
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->smarty->fetch($this->getTemplate('invoice.tax-tab'));
|
return $this->smarty->fetch($this->getTemplate('invoice.tax-tab'));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function smartyTranslate($params, &$smarty)
|
|||||||
{
|
{
|
||||||
$htmlentities = !isset($params['js']);
|
$htmlentities = !isset($params['js']);
|
||||||
$pdf = isset($params['pdf']);
|
$pdf = isset($params['pdf']);
|
||||||
$addslashes = isset($params['slashes']);
|
$addslashes = (isset($params['slashes']) || isset($params['js']));
|
||||||
$sprintf = isset($params['sprintf']) ? $params['sprintf'] : false;
|
$sprintf = isset($params['sprintf']) ? $params['sprintf'] : false;
|
||||||
|
|
||||||
if ($pdf)
|
if ($pdf)
|
||||||
|
|||||||
@@ -220,11 +220,28 @@ class AdminCmsControllerCore extends AdminController
|
|||||||
$this->displayListFooter($token);
|
$this->displayListFooter($token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
/**
|
||||||
|
* Modifying initial getList method to display position feature (drag and drop)
|
||||||
|
*/
|
||||||
|
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway'))
|
if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway'))
|
||||||
$this->filter = true;
|
$this->filter = true;
|
||||||
|
|
||||||
|
if ($order_by && $this->context->cookie->__get($this->table.'Orderby'))
|
||||||
|
$order_by = $this->context->cookie->__get($this->table.'Orderby');
|
||||||
|
else
|
||||||
|
$order_by = 'position';
|
||||||
|
|
||||||
|
if (is_null($order_way))
|
||||||
|
$order_way = Tools::getValue($this->table.'Orderway', 'ASC');
|
||||||
|
|
||||||
|
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function postProcess()
|
||||||
|
{
|
||||||
|
|
||||||
if (Tools::isSubmit('viewcms') && ($id_cms = (int)Tools::getValue('id_cms')) && ($cms = new CMS($id_cms, $this->context->language->id)) && Validate::isLoadedObject($cms))
|
if (Tools::isSubmit('viewcms') && ($id_cms = (int)Tools::getValue('id_cms')) && ($cms = new CMS($id_cms, $this->context->language->id)) && Validate::isLoadedObject($cms))
|
||||||
{
|
{
|
||||||
$redir = $this->context->link->getCMSLink($cms);
|
$redir = $this->context->link->getCMSLink($cms);
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
|||||||
$contact = new Contact((int)$ct->id_contact);
|
$contact = new Contact((int)$ct->id_contact);
|
||||||
if (Validate::isLoadedObject($contact))
|
if (Validate::isLoadedObject($contact))
|
||||||
{
|
{
|
||||||
$from_name = $contact->name;
|
$from_name = $contact->name[(int)$ct->id_lang];
|
||||||
$from_email = $contact->email;
|
$from_email = $contact->email;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -805,4 +805,4 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
|||||||
die('{"hasError" : false, "errors" : ["'.$str_errors.$str_error_delete.'"]}');
|
die('{"hasError" : false, "errors" : ["'.$str_errors.$str_error_delete.'"]}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,12 +43,14 @@ function p1540_add_missing_columns()
|
|||||||
if ($id_module)
|
if ($id_module)
|
||||||
{
|
{
|
||||||
$list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'layered_product_attribute`');
|
$list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'layered_product_attribute`');
|
||||||
foreach ($list_fields as $k => $field)
|
if(is_array($list_fields))
|
||||||
$list_fields[$k] = $field['Field'];
|
{
|
||||||
|
foreach ($list_fields as $k => $field)
|
||||||
if (!in_array('id_shop', $list_fields))
|
$list_fields[$k] = $field['Field'];
|
||||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`'))
|
if (!in_array('id_shop', $list_fields))
|
||||||
$errors[] = Db::getInstance()->getMsgError();
|
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`'))
|
||||||
|
$errors[] = Db::getInstance()->getMsgError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');;
|
$key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<!-- PRODUCTS TAB -->
|
<!-- PRODUCTS TAB -->
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 20%; padding-right: 7px; text-align: right; vertical-align: top">
|
<td style="width: 22%; padding-right: 7px; text-align: right; vertical-align: top">
|
||||||
<!-- CUSTOMER INFORMATIONS -->
|
<!-- CUSTOMER INFORMATIONS -->
|
||||||
<b>{l s='Order Number:' pdf='true'}</b><br />
|
<b>{l s='Order Number:' pdf='true'}</b><br />
|
||||||
{$order->getUniqReference()}<br />
|
{$order->getUniqReference()}<br />
|
||||||
@@ -93,9 +93,14 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
{if isset($carrier)}
|
||||||
|
<b>{l s='Carrier:' pdf='true'}</b><br />
|
||||||
|
{$carrier->name}<br />
|
||||||
|
<br />
|
||||||
|
{/if}
|
||||||
<!-- / CUSTOMER INFORMATIONS -->
|
<!-- / CUSTOMER INFORMATIONS -->
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 80%; text-align: right">
|
<td style="width: 78%; text-align: right">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<tr style="line-height:6px;">
|
<tr style="line-height:6px;">
|
||||||
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td>
|
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td>
|
||||||
|
|||||||
@@ -92,6 +92,11 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
{if isset($carrier)}
|
||||||
|
<b>{l s='Carrier:' pdf='true'}</b><br />
|
||||||
|
{$carrier->name}<br />
|
||||||
|
<br />
|
||||||
|
{/if}
|
||||||
<!-- / CUSTOMER INFORMATION -->
|
<!-- / CUSTOMER INFORMATION -->
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 85%; text-align: right">
|
<td style="width: 85%; text-align: right">
|
||||||
|
|||||||
Reference in new issue
Block a user