Smarty Questions
Ad
Ajax calling PHP and getting Return value
Not used javascript -> ajax -> php -> javascript before and i am struggling to pick-up the return value. ajax is calling the php, but
Upload CSV File in Admin Controller - Custom module
I'm trying to create an admin controller with a csv file uploader to process it like an array. i can't find an efficient way to do it, i
Smarty equivalent for str_split()
Im looking for an equivalent for str_split() in smarty as {php}{/php} looks like deprecated and not very clean. i came across explode but it needs
use multiple files in category.tpl with smarty
{$category->id|escape:'htmlall':'utf-8'} this smarty code is for get id number on category.tpl we have lot of category id's
HTML Template PHP get Header() - How access to its content?
I'm new with php and i'm trying to modify the header of a pdf created by a prestashop module.
Superscript characters in Prestashop 1.7 product name
One of the products in my website has a superscript character in the product name. since prestashop does not allow html tags inside product names,
How display the first element of a list ? Smarty, Prestashop module
I'm trying to change a view in a prestashop module. i would like to display just the first one case of a list. here, is the original
How to reinstall database on Prestahop Module?
I'm trying to customize a prestashop module and i need to add two new colonnes in a table. the problem is that the database is already
How to render Html with smarty
I'm trying to render my raw html with smarty. {if !empty($brand.description)} {$brand.description} {/if} the
How to keep only the first paragraph of $product.description_short in a listing?
I want to keep only the first paragraph of product description in categories. example: <p>this is a pretty good
Ad
Prestashop: issue with conditional statements in tpl file (PHP, Smarty)
I'm struggling to achieve this: display a conditional voucher in the order confirmation page. the voucher is related with
Prestashop PHP Smarty Errors
My error_log file keeps getting filled with this error and i don't know what is causing it. any idea how i can find what is causing the error
Prestashop 1.7 add <br> special character tag in category name but invalid , how to split string in menu navigation nav?
A lot of people are having a similar problem for adding a hashtag in the product name. i am trying to add a tag ( html line break ) in the
Generate admin product route in Prestashop 1.7
I would like to know how to generate the "admin product route" in php using prestashop 1.7. in my case i got the product id i need and i
call php function from smarty .tpl prestashop
I'm working to update a module for prestashop. in this i use the hookdisplayadminorder in this way: public function
Render html from display hook without template file
I want to add a div with a specific id (later filled by some javascript) using a display hook. i can create a dedicated tpl file, but it
get element id from template using smarty - Prestahop
I'm using smarty in prestashop. in my php file i built a function like this:
Unable to multiply two variables in Smarty on Prestashop
In my prestashop store, i have two variables per_sqft_price and per_box_price. per_sqft_price is having currency
Prestashop display product categories and subcategories
On the product page i want to display all categories and subcategories to which the product is assigned. something like this: -category 1 --sub1
Prestashop - Full-Product-Description in Checkout
I thought this would be quite easy but it turned out to be a tough task. my client requested me to implement the complete product
{convertPrice price=$product.price} does not work in prestashop 1.7
This is the error: syntax error in template "file: / home / quetupec / public_html / clonpresta / modules / loyalty /
Ad
Need help retrieving cart information from prestashop 1.4 site to another site (Cart total/amount)
I have completely built my website. and i hit a snag when i need to display cart information such as amount of products, total price etc..
Prestashop I can't make regex_replace works
I have this regex_replace in my template : {$product.unit_price_full|regex_replace:"/^[\d\s]*,?\d{2}\s*[€$₪]*\s*/u":""}
Adding product attributes to a custom modal Prestashop 1.7
I'm creating a custom modal pop-up in the product page, in which i need to put product attributes. i have included "product-variants.tpl"
How to add "N" days to $smarty.now?
I have a parameter in my page called 'pricevaliduntil', for this parameter i have the line: <meta itemprop="pricevaliduntil"
Prestashop template - smarty with underscore character do not work
I need to add conversion code to the order-confirmation.tpl template. but if is underscore(maybe i try just a few) characters in the variable name
Con't able to find cookie value in prestashop Context::getContext()->cookie but it is show in $_COOKIE?
I am creating a module in which i use third party js. that js create a cookie in browser. at backend i want to read that cookie by the help of
Smarty operation in Prestashop 1.7
I'm trying to do in prestashop 1.7 math operation between two smarty variables inside product-discounts.tpl but result is wrong...
How to make different tpl depending on the name of the hook for module?
In some modules i want to make a different output of information depending on the name of the hook. how to write a working condition in the module
How to loop over an array in Smarty/Prestashop?
I use this code in prestashop {if (strpos($product.name, 'tvnumber1') !== false)} this product is in sale {/if}
Prestashop 1.7 - global var doesnt work on CMS page
How can i check language on cms page? i use {if $language.iso_code=='gb'}{/if} on homepage
Prestashop, Get other products with same ean13 in product page
I'm newbie to smarty and php. my situation is that my product_reference is unique but product_ean13 is similar in some products which are
Ad
Include a static html image in a dynamic database loading code
I have the below code which will load product pictures in the product page's long description in prestashop, it works great to load all the
How to get Category Description in prestashop template
I want to show a category description in my products list page (in the filters part). but i only have the name and id of the category and can't
Prestashop Trying to get property of non-object in/Undefined index: HOOK_HOME_SECONDARY_LEFT
When the variable _ps_mode_dev_ is to true, so in debug mod. i have these errors that i could not solve. can anyone help my for that issue ?
cant find a word with strpos in smarty (prestashop)
I am going to edit the .tpl that generate delivery slips in prestashop. i want to check if one product in the order contains a particular
How to populate POST data from postProcess to smarty tpl via hookPaymentReturn
I'm trying to change the behavior of a payment module in prestashop 1.6.x, in order to create a customer receipt from the
Obtaining order id in Order Detail Template
Is there a way to get the id of the order that is opened in order-detail.tpl i am using this function with a set id instead of order_id but
Add New Back Office Field In Prestashop
How can i add a new field in prestashop's back office? specific, i want to insert a text field in the bo: orders->statuses->add new order
How can i modify the value of $order->id_customer in PaymentModule.php by creating a variable in shopping-cart.tpl?
I have the following code in shopping-cart.tpl: $(document).ready(function(){ $.ajax({ url:
How to bootstrap modal popup via a variable?
I am studying the bootstrap, and follow the example: <button class="btn btn-primary btn-lg" data-toggle="modal"
Smarty templates i18n
I just wonder about an easy way to make i18n inside smarty templates. something like gettext() which i already use inside my php scripts.
Can't use smarty templating engine in my custom wordpress theme
I am trying to use the smarty templating engine in my custom wordpress theme but i ended up getting the follosing error :
Ad
Get order id and price without tax and shipping in Prestashop payment return
Please how can i get order id and price without tax and shipping in themes/mytheme/modules/bankwire/views/templates/hook/payment_return.tpl to
Shopify If Tag does not contain
What's the opposite of contains in shopify liquid smarty tags? i basically want to hide products from search
Shopify / Liquid find "-" and remove and content before
I have some content, for example: product type - colour name (this changes but always the same format, i want to just display the "colour name" it is outputted
How to convert all css links in inline styles using smarty - seo speed optimization
I am trying to make my css links inline ( for a speed optimization ). here is a sample with a pure php: echo '<style>'; foreach ($module_css_files as
Ad
Blog Categories
Ad