Skip to main content

Make Prestashop dev sites noindex, nofollow

In Prestashop, we need to make a change to a template file to send out the 'no index, nofollow;' signal to robots.

Ideally, we will be using a child theme, as we will need to change a template file.

The 'head.tpl' file controls the header of the website.

Find it at public_html/themes/child_classic/templates/_partials/head.tpl

Find the SEO block at line 32

seo_block.jpeg

Add the following code under line 38.

<meta name="robots" content="noindex, nofollow">

Now the whole block will look like:

seo_block_revised.jpeg

 Robots are now blocked from the site.

You can test this by going to https://www.siteguru.co/free-seo-tools/noindex

Add the site URL and you'll be able to test if your change has been successful.

  • Hits: 14

Make the order ref the same as the order ID

To make the order reference in PrestaShop 8.2 the same as the order ID, you'll need to modify the Order.php file. This involves changing the generateReference() function to return the order ID instead of a random alphanumeric string.
Here's a step-by-step guide:
  1. Locate the Order.php file: Navigate to the PrestaShop installation directory, then go to classes/order/Order.php.
  2. Open the Order.php file: Open the file using a text editor.
  3. Find the generateReference() function: Locate the generateReference() function within the Order class.
  4. Modify the function: Replace the existing code within the generateReference() function with the following:
public static function generateReference($order_id) {
        return $order_id;
    }
This code directly returns the order ID as the reference.
  1. Save the file: Save the changes to Order.php.
  2. Clear the cache: To ensure the changes are reflected, clear the PrestaShop cache. You can do this by navigating to your PrestaShop backend, going to "Performance," and then clicking "Clear Cache".
  3. Verify the changes: Place a test order to verify that the order reference now matches the order ID.
  • Hits: 5

Element Product Category - make product boxes same caption height

In the element go to advanced, at the bottom open custom CSS

Here is where you paste the code.

You'll need to adjust the elementor number to what you're working on so, open the developer tools (F12) and find the element so you can change the number.

Then alter the minimum height in the code.

.elementor-5170101 .elementor-element.elementor-element-f978015 figcaption {
min-height: 100px
}
  • Hits: 10

Prestashop MarketPlace - changing URLs of Stores

If you need to modify the store URL associated with your modules in your Marketplace Addons account, and to help us process your request promptly, I invite you to contact the concerned department Webmaster marketplace Addons via the help center:

1- https://addons.prestashop.com/en/contact-us
2- Choose "I have a question regarding The PrestaShop Addons site".
3- Select "I have a question on another subject".
4- Fill in and send the form at the end of the page, specifying :

• the reason for the change
• the product to be associated with a new URL
• the new URL in question

I invite you to read this article: https://help-center.prestashop.com/hc/en-us/articles/9201828604050-Modify-the-URL-associated-with-a-module

  • Hits: 22

Background colour that I missed

This arises when you first make the 'child theme' as there is a instruction in the css to maked a red background for the header - just comment this out or delete it from childtheme/assets/css

background colour to footer

colour background I had missed

  • Hits: 6