• Rudi

    (@rudiahlers)


    Hi,

    can someone please tell me, how exactly do I patch Shop.php, for PetraShop and WordPress to work side-by-side if WordPress is installed in the website root (i.e. “www.{domain}/”) and PrestaShop in “/shop” (i.e. “www.{domain}/shop/”)

    I’m running WordPress + PrestaShop.

    So far I have tried the following:

    Yet when I access https://www.{domain} I’m still redirected to https://www.{domain}/shop.

    Can someone please give me some exact instructions on how to fix this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author aytechnet

    (@aytechnet)

    You may try the following command instead after copying the patch file as shop.php.patch once in the right directory : patch < shop.php.patch

    The patch file should never be renamed as a php file!

    I find the instructions to be unclear too. Where should the new code be put exactly? Can you please explain how the patching should be done? Thanks!

    Are the line numbers of the patch still applicable in version 1.6.1.4? Thanks!

    I also need some clear instructions! Where do I put the code? that @@ -423,0 stuff looks odd, what programming language is that?

    Thanks in advance!

    Thread Starter Rudi

    (@rudiahlers)

    Can you please post clear step by step instructions on how to patch the file? This is for PrestaShop 1.6.1.3

    Aplicar el parche es relativamente facil, lo unico que tienes que saber es primero que archivo es el que vas a modificar en este caso shop.php dentro de la carpeta classes/shop/ (o mejor aun poner el archivo modificado en la carpeta override, creando la misma ruta override/classes/shop/), el arhivo parche lo que indica es si tienes que agregar o quitar código, el formato a seguir es el siguiente: Cuando veas el parche tienes unos signos ( – y +)
    El signo menos(-) tienes que quitar y el signo mas(+) tienes que a?adir ese código.
    Los que no tienen signo son sólo para dar una referencia de donde hay que aplicar el parche, o sea abres shop-php con un editor (buscas las lineas de refencia y a?ades o quitas el codigo según indique el signo + o -), por ejemplo lo que indica el parche de este plugin es:
    }

    // If an URL was found but is not the main URL, redirect to main URL
    + /* BEGIN HACK : do not redirect */
    + if (!defined(‘PRESTASHOP_INTEGRATION_VERSION’))
    if ($through && $id_shop && !$is_main_uri)
    {

    entre esas lineas hay que a?adir las lineas que tiene + (pero sin escribir el signo +), es decir:
    /* BEGIN HACK : do not redirect */
    if (!defined(‘PRESTASHOP_INTEGRATION_VERSION’))

    y así las demás y las que tenga signo -, pues eliminarlas o comentarlas.
    Eso es todo.

    • This reply was modified 8 years, 2 months ago by penseo.

    Hello. I’m trying to make the patch modifications work on my shop.php but it doesn’t work, i’m desperate.
    I am using Prestashop 1.6.1.11 and WordPress 4.7.3, the line numbers mentionned in the patch don’t match to the ones in my shop.php and I think that could be the reason of my mistakes when trying to apply the patch.

    Could anyone help me with that ?
    Thanks in advance !
    Alexis

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to patch Shop.php? Instructions needed, please’ is closed to new replies.