Jump to content

Pre-order is shown on most Google search product page results


DanGB

Recommended Posts

Hi, I am having a strange issue.

On most Google search results of our Prestashop site product pages, it shows 'Pre-order' on the search results.

If you google:
Helix Single Mass Flywheel Performance Clutch Kit - AKS tuning

You will see it lists the price and Pre-order at the bottom of each relevant result.

It happens with most but not all products.

The site DOES NOT have any pre-orders and never has.

Ive searched the 'pre-order' text in all the site files and database and barely comes up and where it does its not relevant. I just cant work out where its coming from.

Prestashop 1.7.6.4. 

Edited by DanGB (see edit history)
Link to comment
Share on other sites

Ive found the solution. 😁

In ProductLazyArray.php:

public function getSeoAvailability()
    {
        $seoAvailability = 'https://schema.org/';
        if ($this->product['quantity'] > 0) {
            $seoAvailability .= 'InStock';
        } elseif ($this->product['quantity'] <= 0 && $this->product['allow_oosp']) {
           /* $seoAvailability .= 'PreOrder';*/
			 $seoAvailability .= 'InStock';
        } else {
            $seoAvailability .= 'OutOfStock';
        }

        return $seoAvailability;
    }

I changed the preOrder to InStock always.

I don't use stock management, hence why everything was 0 stock and set to pre-order.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...