PrestaShop Archives

Associate variable usage in Smarty

You can create and assign associative array like following:

In the template page:

How to combine two or more modifiers in smarty

The following code snippet will show you how to combine two modifiers in smarty:

{$title}

{$title|upper|truncate:20}

//output is

Uppercase a string with smarty

String formatting using smarty

You can format string with string_format function of smarty in following ways:

String replace function in smarty

It is easy to replace a portion of string or character from a string in smarty with its replace function, just see the following example:

Output :

Incoming search terms:

  • prestashop smarty string replace

Truncate a string in smarty

You can truncate a string in smarty as follows:

//this will truncate product name to 20 characters long and add ‘…’ at the end.

That’s it!

If, you get an error like this:

Prestashop Exception: Property Configuration->name length (34) must be between 0 and 32 at line 837 in file classes/ObjectModel.php

Then, it means that one of your module configuration key name is too long. The error message will tell you the current length of the key and how long it can be. It will also tell you the line number where you can find the configuration key. Usually it will be a line like this

Configuration::updateValue(‘THIS_IS_MY_VERY_LONG_CONFIG_KEY_NAME’, ‘Some value’);

Use the exception messages to find the file, the line number and the key and change it.

Incoming search terms:

  • PrestaShop Exception
  • prestashop Property Category->name length
  • Property Category->name length must be between 0 and 64 prestashop
  • Property Configuration->name length (34) must be between 0 and 32

You can print the whole content of a smarty array from template page by following way:

That’s it!

Adding and removing currency in Prestashop

We can add/remove currencies in Prestashop by doing the following:

Go to admin, select Payments and click on currency link, you will get a screen like this:

Click on Add New button to add currency if you need. In order to remove currency click the check box of the currency and press the delete selection. If you want some currencies for using later, better don’t delete it, click the check mark to disable it, later if needed you can enable it by clicking the X button.

That’s it.

You have an online shop, a merchant account with First Data and just need the right payment module to integrate First Data Global Gateway into your shop – that’s it your ready to go online!

Wait a minute – you see First Data Global Gateway Virtual Terminal, First Data Global Gateway e4 Hosted Payment Page and First Data Global Gateway e4 Web-services modules. What is the difference? Which one to choose?

First Data Global Gateway Virtual Terminal (previously known as LinkPoint), is one of the oldest and the most reliable merchant services to process payments online. When you register for a First Data Global Gateway Virtual Terminal account you will get a PEM file which is a security file that helps your website talk to the First Data server.

Recently, First Data has launched a new payment solution called First Data Global Gateway e4 which has both hosted payment pages and a web services methods. First Data strongly recommends the use of First Data Global Gateway e4 over First Data Global Gateway Virtual Terminal. Login into your First Data account and go to Support > Download Center. If, you see a link to download your PEM file then, you have a FDGG Virtual Terminal account. Click here to learn more about setting up your FDGG Virtual Terminal module.

Then, what is First Data Global Gateway e4 Hosted Payment Pages & Web-services API?
FDGG e4 Hosted Payment Pages protects the user from handling sensitive customer payment data by hosting the payment pages and forms on their servers. The flow in this method will redirect the buyer from the users site to the First Data server to enter their payment details and complete the payment. Once the payment is successful the buyer is redirected back to the users site with the payment details. This method not only protects the user but, also reduces the steps for PCI compliance.

FDGG e4 Web-services API on the other hand allows users to provide a seamless process for their buyers by processing the payment directly on their website without any redirection. In this method the buyer will remain on the shop – the user will collect the payment data via their website and send it to First Data through web-service calls and get the response. This method the payment information passes through the merchants shop server.

So if, you are a new customer of First Data then most probably you will have the First Data Global Gateway e4 account. Or if, you are an existing user and have not heard about a PEM file or your bank (like Bank of America) says that you do not have a PEM file then you are a First Data Global Gateway e4 account holder.

Incoming search terms:

  • unable to use client certificate (no key found) or wrong pass phrase
  • fdgg e4
  • unable to use client certificate (no key found or wrong pass phrase
  • magento ios
  • how is global gateway virtual terminal and global gateway e4 different
  • global payments e4
  • first data global gateway e4 cancellation fee
  • first data e4 global gateway api php example
  • e4 vs linkpoint
  • difference between payment gateway e4 and virtual terminal
Page 1 of 212