ecommercePrestaShop
Members-
Posts
16 -
Joined
-
Last visited
-
Days Won
1
ecommercePrestaShop last won the day on August 16 2019
ecommercePrestaShop had the most liked content!
Profile Information
-
First Name
ecommerce
-
Last Name
PrestaShop
Recent Profile Visitors
392 profile views
ecommercePrestaShop's Achievements
Newbie (1/14)
2
Reputation
-
ecommercePrestaShop started following Scully
-
Thank you Scully , with your guidance ,I have figured out if the delivery & billing address is same you need to assign this $invoice_address->id_state; in HTMLTemplateInvoice.php if delivery & billing address differ you need to assign $delivery_address->id_state; in HTMLTemplateInvoice.php . And catch the variable in invoice.tpl Hence this solved
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
no friend this is giving blank , I have tried this before too
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
it is giving the number but wrong number...the customer's state id is 327 but it is giving 94
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
I have checked the HTMLTemplateInvoice.php , it is $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); I have tried to print $delivery_address in tpl but it is not printing .... I have attached HTMLTemplateInvoice.php for you reference , can you tell me how to print the $delivery_address in tpl file <?php /* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * @since 1.5 */ class HTMLTemplateInvoiceCore extends HTMLTemplate { public $order; public $available_in_your_account = false; public function __construct(OrderInvoice $order_invoice, $smarty) { $this->order_invoice = $order_invoice; $this->order = new Order((int)$this->order_invoice->id_order); $this->smarty = $smarty; // header informations $this->date = Tools::displayDate($order_invoice->date_add); $id_lang = Context::getContext()->language->id; $this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number); // footer informations $this->shop = new Shop((int)$this->order->id_shop); } /** * Returns the template's HTML content * @return string HTML content */ public function getContent() { $country = new Country((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_delivery_address = ''; if ($this->order->id_address_delivery != $this->order->id_address_invoice) { $delivery_address = new Address((int)$this->order->id_address_delivery); $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); } $customer = new Customer((int)$this->order->id_customer); $this->smarty->assign(array( 'order' => $this->order, 'order_details' => $this->order_invoice->getProducts(), 'cart_rules' => $this->order->getCartRules($this->order_invoice->id), 'delivery_address' => $formatted_delivery_address, 'invoice_address' => $formatted_invoice_address, 'tax_excluded_display' => Group::getPriceDisplayMethod($customer->id_default_group), 'tax_tab' => $this->getTaxTabContent(), 'customer' => $customer )); return $this->smarty->fetch($this->getTemplateByCountry($country->iso_code)); } /** * Returns the tax tab content */ public function getTaxTabContent() { $address = new Address((int)$this->order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT') && !empty($address->vat_number) && $address->id_country != Configuration::get('VATNUMBER_COUNTRY'); $carrier = new Carrier($this->order->id_carrier); $this->smarty->assign(array( 'tax_exempt' => $tax_exempt, 'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(), 'product_tax_breakdown' => $this->order_invoice->getProductTaxesBreakdown(), 'shipping_tax_breakdown' => $this->order_invoice->getShippingTaxesBreakdown($this->order), 'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(), 'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(), 'order' => $this->order, 'order_invoice' => $this->order_invoice, 'carrier' => $carrier )); return $this->smarty->fetch($this->getTemplate('invoice.tax-tab')); } /** * Returns the invoice template associated to the country iso_code * @param string $iso_country */ protected function getTemplateByCountry($iso_country) { $file = Configuration::get('PS_INVOICE_MODEL'); // try to fetch the iso template $template = $this->getTemplate($file.'.'.$iso_country); // else use the default one if (!$template) $template = $this->getTemplate($file); return $template; } /** * Returns the template filename when using bulk rendering * @return string filename */ public function getBulkFilename() { return 'invoices.pdf'; } /** * Returns the template filename * @return string filename */ public function getFilename() { return Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id, null, $this->order->id_shop).sprintf('%06d', $this->order_invoice->number).'.pdf'; } }
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
We have no choice because of GST we need to show the two taxes for one product and it is has to be printed on invoice... I have figured out this with newest version but few stores are on old version .... are there any way to get variable in invoice.tpl
- 17 replies
-
- 1
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
State::getNameById working fine if I manually put any id, but I want to get the customers delivery state id ($addresses.invoice->id_state as this is not giving any value), I want this for some tax calculation based on state
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
Yes , have a look at this screenshot http://prntscr.com/g0y7y6
- 17 replies
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
How to get delivery address state id variable in pdf/ invoice.tpl file, I have tried State::getNameById({$addresses.invoice->id_state}) but it is not working ... I want to check the customer's delivery state I am using PrestaShop version: 1.6.0.5 -------------------------------------------------------------------------------------------- Solution:- delivery & billing address is same you need to assign this $invoice_address->id_state; in HTMLTemplateInvoice.php delivery & billing address differ you need to assign $delivery_address->id_state; in HTMLTemplateInvoice.php . and catch the variable in invoice.tpl
- 17 replies
-
- 1
-
- delivery address
- tpl
-
(and 1 more)
Tagged with:
-
ecommercePrestaShop started following pradeep_evalogical
-
How many product can prestashop support
ecommercePrestaShop replied to ecommercePrestaShop's topic in General topics
what about scalability ? will it support 50000 products? will it work like normal as of now for 20000 products it works without any problem .... my major concern is regarding 50000 products -
Hello, We have installed many prestashop site for our clients, but the product limit was like 500 products to 20,000 products. But one of our new client has 50000 products(books as products). Can prestashop capable for this ? if yes ... what kind of hosting I should use? Thanks
-
Hello, we require a quote for the product upload job for one of the books publishing site , where we have 2000 products, we will be able to provide you -Excel Sheet (All product data) -Product Images -FTP If you think that you can do this, then please reply or send me message. Thanks