:::: MENU ::::

PrestaShop database configuration

Today we talk about how in PrestaShop database configuration work. Sometimes you need to edit database connection manually for moving one server to another or local server to live server. I recently find difficulty to find the database configuration. SO we focus on where the PrestaShop database connection file exists or edit from the back office. There are two ways to way to change the database configuration.

Admin Panel

Login to the back office.You can go to Preferences > Database to change the database settings

Database Configuration file in 1.6

Location of file in following directory.

config/settings.inc.php

Database Configuration in file 1.7

Location of file in following directory.

app/config/parameters.php
Author: Qaisar Satti
Category: Prestashop
Last Modified: November 28, 2019


Magento 2 call a phtml file in static block

Today we talk about how to in Magento 2 call a phtml file in static block. Calling a phtml file is no different as compared to Magento 1 calling. But if you are calling it in cms block you have to use a class instead of type.

Calling a phtml file on the static block. Just add class and template path.

My current file location for the module is.

app/code/QaisarSatti/HelloWorld/Block/HelloWorld/view/frontend/templates/helloworld.phtml

{{block class="QaisarSatti\HelloWorld\Block\HelloWorld" template="QaisarSatti_HelloWorld::helloworld.phtml"}}

My current phtml location for the theme is.

app/design/frontend/QaisarSatti/helloworld/Magneto_Theme/templates/helloworld.phtml

{{block class="QaisarSatti\HelloWorld\Block\HelloWorld" template="helloworld.phtml"}}

If you want to add phtml with general magento class. Use following code.

{{block class="Magento\Framework\View\Element\Template" template="helloworld.phtml"}}
Author: Qaisar Satti
Category: Magento 2
Last Modified: November 28, 2019


PrestaShop change APE length

A few days ago I faced the problem regarding PrestaShop change APE length. So I think it will be better to share the solution with you all. There are no ways to change the APE length from PHP file you have to change the length. You need to modify the default PrestaShop table ps_customer. Running the following query will change the length of the APE field.

Run following SQL query and change the length accordingly. I am setting the length to 16.

ALTER TABLE `ps_customer` CHANGE `ape` `ape` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

That’s it from this article. I strongly believe there is always room for improvement. So I am open to any suggestion and feedback. Please feel free to leave what you are thinking in the comments section below. Cheers.

Author: Qaisar Satti
Category: Prestashop
Last Modified: September 27, 2019


PrestaShop change SIRET Length

Today we talk about PrestaShop change SIRET length. There is not only one way to change the SIRET length from PHP file you have to change the length. You need to modify the default PrestaShop table ps_customer.

First, you have to change the length in PHP file. The class path is following. and Search for function isSiret.

classes/Validate.php

public static function isSiret($siret)
{
 

if (Tools::strlen($siret) != 16)
return false;
$sum = 0;
for ($i = 0; $i != 16; $i++)
{
$tmp = ((($i + 1) % 2) + 1) * intval($siret[$i]);
if ($tmp >= 10)
$tmp -= 9;
$sum += $tmp;
}
return ($sum % 10 === 0);

}

Run following SQL query and change the length accordingly. I am setting the length to 16.

        ALTER TABLE  `ps_customer` CHANGE  `siret`  `siret` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

That’s it from this article. I strongly believe there is always room for improvement. So I am open to any suggestion and feedback. Please feel free to leave what you are thinking in the comments section below. Cheers.

Author: Qaisar Satti
Category: Prestashop
Last Modified: September 27, 2019


Top 10 woocommerce plugins

In this article, I will share Top 10 woocommerce plugins you must have. I have already written an article about woocommerce and also about plugins.You can read that here Must have woocommerce plugins.Also, there are a number of plugins available to enhance your store’s functionalities and performance. We will discuss few hands picked plugins here too.

Having that said, let’s take a look at the best free WooCommerce plugins for WordPress.

1. OptinMonster
OptinMonster is the most powerful conversion optimization software in the market. It helps you convert abandoning website visitors into subscribers and customers.
You can use it on your eCommerce website to reduce cart abandonment, increase sales conversion, grow your email list, show targeted website messages, onsite retargeting, and more.
If you’re serious about growing your email list and boosting sales, then you need this conversion optimization toolkit.

2. YITH WooCommerce Wishlist

YITH WooCommerce Wishlist plugin allows your customers to save products to their wishlist. They can use the wishlist to make the purchase later or share their wishlist with friends and family.

This is a perfect addon for your online store during busy holiday seasons when people are making their shopping lists and purchasing gifts.

3. WooCommerce Multilingual
Non-English WordPress websites surpassed the English WordPress websites in 2014. Since then more WooCommerce stores are created in languages other than English. WooCommerce Multilingual adds compatibility layer with the popular WPML WordPress multilingual plugin.

This allows you to translate your product and other WooCommerce pages in multiple languages. Your customers can choose to browse your website in their preferred language.

4. WooCommerce Products Slider
WooCommerce Products Slider allows you to easily create beautiful product sliders and carousels and add them anywhere on your WooCommerce store.

5. WooCommerce Customizer

WooCommerce Customizer provides an easy user-interface to use built-in WooCommerce filters. These filters allow you to customize things like button text, labels, fields, and much more.

Normally, you would have to write PHP code to use these filters. With WooCommerce customizer, you can easily use those filters from a simple settings page (no coding necessary).

6. WooCommerce EU VAT Compliance

As the name suggests, this simple plugin makes your WooCommerce shop compliant with the new EU VAT. It will automatically detect your customer’s location and will display prices with correct VAT from the first page.

7. Order Delivery Date for WooCommerce

This plugin allows users to choose a delivery date for products during the checkout. WooCommerce store owners can see the desired delivery date on their orders page in the admin area.

8. YITH WooCommerce Quick View

WooCommerce Quick View allows your customers to peek into product details by simply taking their mouse over a button. This enables customers to quickly get the product information without leaving the product listings or shop page.
Users will be able to see a larger product image, product description, and an add to cart button in a lightbox popup.

9. WooCommerce PDF Invoices & Packing Slips
This nifty plugin allows you to send PDF invoices and packing slips to customers via email. Users can also download their invoices and slips from their account area. As a site admin, you can also bulk generate invoices, download them, and email them to users from an admin area.

10. YITH WooCommerce Compare
As the name suggests, this plugin allows your customers to compare two or more WooCommerce products side by side. You can choose which fields users will see in the comparison table and reorder them as needed.

Similarly, there are many other extensions available. I tried to list a few. I hope this tutorial helps you in any way.
Please feel free to drop any suggestions or queries in the comments section. It will be highly appreciated.

Author: Qaisar Satti
Category: Woo Commerce
Last Modified: August 1, 2019


Must Have WooCommerce Plugins

This is an introductory article about Must have woocommerce plugins. I have already written an article about woocommerce.If you are not familiar with woocommerce, you can read the article here Woocommerce introduction. So if you are a product-based business and want to sell your products online domestically or internationally, then woo-commerce online store could be your optimum choice. Because of its high flexibility and efficiency. Also, there are a number of plugins available to enhance your store’s functionalities and performance. We will discuss a few amazing plugins here.

In this article, I will discuss the free available woo-commerce extensions and plugins. Which can help you enhance your woo-commerce store’s functionality? Let’s start with listing the names.

  • Metrilo WooCommerce Analytics
  • YITH WooCommerce Zoom Magnifier
  • YITH WooCommerce Ajax Product Filter
  • WooCommerce Multilingual – run WooCommerce with WPML
  • Beeketing for WooCommerce
  • WooCommerce Checkout Manager
  • Stripe Payment Gateway
  • WooCommerce Menu Cart
  • Woocommerce CSV Importer
  • Genesis Connect for WooCommerce

Let’s have a brief look at the descriptions of these plugins.

1. Metrilo WooCommerce Analytics, CRM, and Email Automation

It’s true you have some data about your customers and orders in the WP admin panel, but it’s not enough to run your whole marketing on it. A plugin like Metrilo can help you monitor your store’s performance and optimize your marketing spend.
How Metrilo helps your marketing:

  • Tracks all important ecommerce KPIs and people’s actions on site
  • Displays sales, traffic, campaign, product and other reports in an understandable way
  • Easily compares ROI of marketing channels
  • Retention analysis shows you the journey of your customers so you can win their loyalty
  • Customer profiles allow segmentation and personalized marketing
  • Emails are always timely and relevant to email automation
  • Product correlations help create the perfect bundles and promotions

2. YITH WooCommerce Zoom Magnifier

Although many plugins enable the zoom feature on your WooCommerce store, I prefer YITH WooCommerce Zoom Magnifier Plugin, because of its easy customization options. it can be easily customized. Here is comprehensive coverage of the zoom feature.

Several important features of YITH WooCommerce Zoom Magnifier are:

  • Mouse over will show a bigger size product image.
  • Zoom area can be customized
  • You can easily enable/ disable zoom on the mobile devices
  • Add a slider of product image thumbnails
  • You can also customize the slider behavior

3.YITH WooCommerce Ajax Product Filter

WooCommerce product filter and widget apply the visitors to apply various filters. The users could use any combination of admin-defined criteria for product filters.

4.
WooCommerce Multilingual – run WooCommerce with WPML

Do you want to translate your WooCommerce store into multiple languages? Using this plugin, you can translate everything from WooCommerce offers, products, variations, categories, fields, and attributes.

5. Beeketing for WooCommerce:

Upsell & Cross-sell, Email Marketing, Discount & Free Gifts Promotions, Countdown
Beeketing for WooCommerce plugin brings many marketing and sales solutions into one package, making a complete Marketing Automation suite for WooCommerce business owners. It is built by Beeketing – a Marketing Automation platform specifically for eCommerce websites.

Within the plugin, you will see a list of different apps, each has a distinctive set of features that focus on lifting up conversion rates at different stages in the sales funnel.

Here are what you can do with Beeketing for WooCommerce:

  • Curate stylish email coupon popups to convert visitors into email subscribers or social followers
    Run exit-intent popups to prevent site/cart abandonment
  • Upsell & Cross-sell relevant products based on customer’s cart, bundle products in combo and sell at a total discount price
  • Last-step Upsell at cart page or Post-purchase Upsell after customers complete order
  • Quick View popups that also recommend related items
  • Generate personalized product recommendation sliders: Best Sellers Of Store, Recently Viewed, Who Bought This Also Bought, Hand-picked Products Just For You, Cart Recommendations
  • Display free gift/discount code / free shipping promotions to customers who are about to check out and encourage them to share your products on Facebook/Twitter to receive the offer
  • Create countdown timer offer to create the sense of urgency for your offer
  • Sales and Stock Countdown widgets to promote the promotion and popularity of your products
  • Notify customers of recent orders by displaying live sales notifications to create brand trust and motivate visitors to add items to cart
  • Social proof widgets that show how many people have viewed, added to cart, and purchased a specific product
  • Automated email marketing: a much more affordable MailChimp alternative that helps you create a full personalized follow-up email and newsletters triggered by customers’ behavior and interests
  • Facebook live chat widget on the store so customers can contact and chat directly with you via Messenger
  • Tools to optimize the mobile web conversion such as fixed CTA bar on top or bottom of the mobile screen, and gallery full-screen view of product images

More features added on a regular quarterly basis.
6. WooCommerce Checkout Manager

Using WooCommerce Checkout Manager you can easily customize and manage the fields on the WooCommerce checkout page.

This plugin allows you to:

  • Easily add and reorder new fields on the checkout page
  • Make checkout fields optional
  • Add and remove required fields
  • Hide or show fields for specific user roles
  • Upload files to the checkout page
  • Export orders by field name
  • Create Conditional Fields

7. Stripe Payment Gateway

In the beginning, WooCommerce only supported PayPal Standard. However, today, the official WooCommerce Stripe Payment Gateway is available, completely free of charge.

Previously, you had to download and install this extension like any other WordPress plugin. However, now you can install Stripe gateway during the WooCommerce setup.

8. WooCommerce Menu Cart

WooCommerce Menu Cart adds a shopping cart button in the navigation bar of the store. The feature set of WooCommerce Menu Cart includes:
Selective visibility of the shopping cart icon, depending on the price, items and/or the content of the shopping cart
Floating position
Custom CSS

9. Woocommerce CSV Importer

This plugin allows you to import data from your WooCommerce store in CSV format. Using this plugin, you could import attributes, variable products, premium, taxonomies and custom fields.

10. Genesis Connect for WooCommerce
Genesis Connect for WooCommerce preserves customizations so that no issues arise when the module is updated. In addition, you can put copies of the templates in child theme’s WooCommerce folder and customize these copies as per your requirements.

Similarly, there are many other extensions available. I tried to list a few. I hope this tutorial helps you in any way.

Please feel free to drop any suggestions or queries in the comments section. It will be highly appreciated.

Author: Qaisar Satti
Category: Woo Commerce
Last Modified: August 1, 2019


Create WooCommerce custom plugin

I have thought to put together a mini series covering the basics and day to day task solving tips and tricks of WooCommerce.For now, this first article will cover the basics of creating a custom plugin for your WooCommerce site or how to create a plugin in woocommerce, and provide you with a plugin skeleton to download and use as a starting point. I assume you are familiar with basic WordPress plugin development, and you are moving forward to learn Woocommerce plugins. So, let’s get going!

WooCommerce is a fabulous ecommerce solution, but creating a website or shop is a very personal endeavor, and you are likely to want to change some functionality or behavior of the stock WooCommerce plugin. We often look for simple solutions, and therefore we can be drawn to editing the core files.Honestly, we should avoid this urge. Fortunately, though not as flexible as Magento, WooCommerce provides a lot of action hooks, filters, template files and “template functions” to allow for customizations. Writing a plugin allows us to cleanly separate and keep track of our custom code, and renders WooCommerce upgrades a relatively painless process.

What is an action?

An action in WordPress allows you to execute code triggered at a specific point in the page response process, for instance upon displaying a comment.

What is a filter?

Similar conceptually to an action, filters allow you to modify data at specific points in the WordPress page response process, for instance removing profanity from a comment.

What is a template?

A template is a file that contains a mix of HTML and PHP code and renders a page, a part of a page, or an email. Templates can be overridden by creating a file of the same name in a special location within your theme or child theme.

What is a template function?

A “template function” is a function that begins with if ( ! function_exists( ‘function_name’ ) {… If your plugin defines this function first it will be called in place of the default function and allow you to override its behavior with your own.

Writing a custom plugin largely allows you to alter the functionality and behavior of WooCommerce; to customize the look and feel the preferred method is to create a custom child theme.

The Plugin Skeleton

Name your WooCommerce custom plugin as you will, i am naming it as woocommerce-company-name. Although not strictly necessary with a self-authored plugin, it’s good practice to check if WooCommerce is active, and also perform a check to ensure a class with the same name as your plugin doesn’t already exist:

if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
  if ( ! class_exists( 'WC_Helloworld' ) ) {

Next, it’s again good practice though not necessary, to load any translated strings for the plugin. Doing so allows you to use the various translate functions such as __( ‘Some text’, ‘wc_helloworld’ ) and easily provide translation files at some future date.

   load_plugin_textdomain( 'wc_helloworld', false, dirname( plugin_basename( __FILE__ ) ) . '/' );

I prefer to define the bulk of my plugin functions within a class, which effectively scopes the functions you write and keeps you from having to worry about function name clashes with all the other WordPress core and plugin functions. There are a few commonly used lifecycle action hooks which will be included in our skeleton plugin class. Finally, the plugin class will be instantiated, assuming that WooCommerce is active, and the class name isn’t already taken.

class WC_Helloworld {

      public function __construct() {
        // called just before the woocommerce template functions are included
        add_action( 'init', array( $this, 'include_template_functions' ), 20 );

        // called only after woocommerce has finished loading
        add_action( 'woocommerce_init', array( $this, 'woocommerce_loaded' ) );

        // called after all plugins have loaded
        add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );

        // indicates we are running the admin
        if ( is_admin() ) {
          // ...
        }

        // indicates we are being served over ssl
        if ( is_ssl() ) {
          // ...
        }

        // take care of anything else that needs to be done immediately upon plugin instantiation, here in the constructor
      }

      /**
       * Override any of the template functions from woocommerce/woocommerce-template.php
       * with our own template functions file
       */

      public function include_template_functions() {
        include( 'woocommerce-template.php' );
      }

      /**
       * Take care of anything that needs woocommerce to be loaded.
       * For instance, if you need access to the $woocommerce global
       */

      public function woocommerce_loaded() {
        // ...
      }

      /**
       * Take care of anything that needs all plugins to be loaded
       */

      public function plugins_loaded() {
        // ...
      }
    }

    // finally instantiate our plugin class and add it to the set of globals

    $GLOBALS['wc_helloworld'] = new WC_Helloworld();

Furthermore, if you were already familiar with WordPress/WooCommerce development there probably wasn’t much new for you here, but hopefully, if you’re new to the game then the above explanations and techniques will prove helpful in getting you started. Either way, the best way to learn the multitude of WooCommerce actions and filters available for customization is to browse the source code. Also remember that in addition to hooking into actions/filters and adding functionality, you can just as easily unhook existing actions/filters to remove plugin behavior, or change it wholesale. The trick is to perform the remove_action()/remove_filter() calls after the target action is hooked to (for instance within our woocommerce_loaded() function above), and to always remember to provide all the arguments to the remove functions that were passed in the add functions, optional parameters and all.

That’s it from this article. I strongly believe there is always room for improvement. So I am open to any suggestion and feedback. Please feel free to leave what you are thinking in the comments section below. Cheers.

Author: Qaisar Satti
Category: Woo Commerce
Last Modified: August 1, 2019


Pages:1234567...23