
neetupahwa
Members-
Posts
9 -
Joined
-
Last visited
Profile Information
-
Location
Melbourne
-
Activity
Freelancer
Recent Profile Visitors
2,062,219 profile views
neetupahwa's Achievements
Newbie (1/14)
0
Reputation
-
How to Change Prestashop 1.5.4.1 Invoice Font
neetupahwa replied to neetupahwa's topic in Configuring and using PrestaShop
I referred to the documentation again, where can I find addTTFfont() method.. $fontname = $pdf->addTTFfont('/path-to-font/DejaVuSans.ttf', 'TrueTypeUnicode', '', 32); -
I am using Prestashop 1.5.4.1, trying to change font to century gothic, I generated font from this url by uploaded century gothic ttf file: http://www.fpdf.org/makefont/ - cp1252 and uploded both the php and .z file to /tools/tcpdf/fonts and changed the font in PDFGenerator.php. When I tried to generate the invoice in backend. The font does not seems to be working properly, it is not readable. Invoice screenshot is attached. Am I missing any step or is there any other way to add new font in prestashop 1.5.4.1 .. gothic_0.php Thanks...
-
Changed the font in PDFGenerator.php, but it displays error. const DEFAULT_FONT = 'centurygothic'; Error: TCPDF ERROR: Could not include font definition file: centurygothic Do I need to add the font somewhere before using it?
- 8 replies
-
- pdf invoice
-
(and 1 more)
Tagged with:
-
Thanks eleazar. Its working now . One more question, How can I change the font of the invoice to century gothic?
- 8 replies
-
- pdf invoice
-
(and 1 more)
Tagged with:
-
Thanks eleazar for helping me, but it is still not working. When I add {$order->getUniqReference()} to the header.php, the invoice does not open up in pdf, instead it displays only invoice date and invoice number in new browser window and everything is blank under that. When I tried running it only with the {$order->date_add|date_format:"%Y-%m-%d %H:%M"}, it opens up pdf, but does not displays order number; other invoice information (billing address, invoice items etc) are visible. Here is the code (header.tpl): <table style="width: 100%"> <tr> <td style="width: 50%"> {if $logo_path} <img src="#" width="150px" /> {/if} </td> <td style="width: 50%; text-align: right;"> <table style="width: 100%"> <tr> <td style="font-size: 14pt; color: #9E9F9E;">Date: {$date|escape:'htmlall':'UTF-8'}</td> </tr> <tr> <td style="font-size: 14pt; color: #9E9F9E">{$title|escape:'htmlall':'UTF-8'}</td> </tr> <tr> <td style="font-weight: bold; font-size: 14pt; color: #444; width: 100%">Order Number: {$order->getUniqReference()}</td> </tr> <tr> <td style="font-weight: bold; font-size: 14pt; color: #444; width: 100%">Order Date: {$order->date_add|date_format:"%Y-%m-%d %H:%M"}</td> </tr> </table> </td> </tr> </table> Following is the output of the above code, which is displayed in browser window not pdf; it doesn't displays other invoice information as well. Please help. Date: 28-09-2013 Invoice #000003 Order Number:
- 8 replies
-
- pdf invoice
-
(and 1 more)
Tagged with:
-
Can someone please reply? Any help will be greatly appreciated.
- 8 replies
-
- pdf invoice
-
(and 1 more)
Tagged with:
-
I am trying to add Order number & Order Date under the Invoice number in header.tpl file. How can I access the order number and order date variable? I copied the order number and order date code from invoice.tpl, but its not working. Please help. Here is the code in header.tpl: <tr> <td style="font-size: 14pt; color: #9E9F9E"> {$order->getUniqReference()}</td> </tr>
- 8 replies
-
- pdf invoice
-
(and 1 more)
Tagged with:
-
Add Free Shipping for One Carrier Only
neetupahwa posted a topic in Configuring and using PrestaShop
How can I add free shipping for only one carrier in the list. Prestashop by default assigns free shipping for all the carriers. I am trying to modify the code in the classes--> cart.php. I found the answer here--> http://www.prestasho...e-carrier-only/ but it is applicable for 1.4.3. $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; It says to replace the code with the following code. $disable_freeshipping = array(A-ID); $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0 AND !in_array($id_carrier, $disable_freeshipping)) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND !in_array($id_carrier, $disable_freeshipping) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; I am using 1.5.4.1, How can I modify the code to use for my version? -
Add Free Shipping for One Carrier Only
neetupahwa posted a topic in Configuring and using PrestaShop
How can I add free shipping for only one carrier in the list. Prestashop by default assigns free shipping for all the carriers. I am trying to modify the code in the classes--> cart.php. I found the answer here--> http://www.prestashop.com/forums/topic/173177-solved-ps-1482-free-shipping-for-one-carrier-only/ but it is applicable for 1.4.3. $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; It says to replace the code with the following code. $disable_freeshipping = array(A-ID); $free_fees_price = 0; if (isset($configuration['PS_SHIPPING_FREE_PRICE'])) $free_fees_price = Tools::convertPrice((float)($configuration['PS_SHIPPING_FREE_PRICE']), Currency::getCurrencyInstance((int)($this->id_currency))); $orderTotalwithDiscounts = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); if ($orderTotalwithDiscounts >= (float)($free_fees_price) AND (float)($free_fees_price) > 0 AND !in_array($id_carrier, $disable_freeshipping)) return $shipping_cost; if (isset($configuration['PS_SHIPPING_FREE_WEIGHT']) AND !in_array($id_carrier, $disable_freeshipping) AND $this->getTotalWeight() >= (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) AND (float)($configuration['PS_SHIPPING_FREE_WEIGHT']) > 0) return $shipping_cost; I am using 1.5.4.1, How can I modify the code to use for my version?