Jump to content

How to establish a development, test and production shop environment


Recommended Posts

Hello folks,

 

I am fairly unexperience with prestashop, although I am using it for years now, so please forgive me if this questions is answered in one of the documentations. Please simply point me to that then.

 

Where I am working in a proffesional business environment, for business application - and I consider my webshop a business application - we do have at least the development environment, where we change the application frequently. We do deploy thoses changes into test environments for extensive testing before we deploy it to the production environment - means to the public.

 

How can i build a devleopment and test environment for Prestashop?

 

I mean I have some ideas with making a backup of the database and the files, put it to a development environment, change it an put it back.

But this will cause several problem, i.e. how to sync the differences between taking the snapshot and enhancing it and what happens in the shop in between....

 

So how is the procedure for having development, test and than production for PresaShop?

 

Thanks for your ideas and links and....

Best regards

Dieter 

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

usually you would just create the various environments, which would all be identical at the start of the process.  you can make changes in dev, document the changes and test them.  Then when ready, promote those changes to test and then test.  Lastly do the same to production.

 

I would not be concerned with making sure the data in the database is in sync.  In fact, I would generally avoid that.  Dev and Test should never really have real production/customer information in it, so you should never worry about making sure that data is in sync with production.

 

Configuration is different, but the documentation you keep about the changes you make in dev/test should cover that.

Link to comment
Share on other sites

  • 1 year later...

@bellini13 Below is a production version of presta 1.7.3.2 classic theme's webpack.config.js:


const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");

let config = {
  entry: {
    main: [
      './js/theme.js',
      './css/theme.scss'
    ]
  },
  output: {
    path: path.resolve(__dirname, '../assets/js'),
    filename: 'theme.js'
  },
  module: {
    rules: [
      {
        test: /\.js/,
        loader: 'babel-loader'
      },
      {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          fallback: 'style-loader',
          use: [
            {
              loader: 'css-loader',
              options: {
                minimize: true
              }
            },
            'postcss-loader',
            'sass-loader'
          ]
        })
      },
      {
        test: /.(png|woff(2)?|eot|ttf|svg)(\?[a-z0-9=\.]+)?$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: '../css/[hash].[ext]'
            }
          }
        ]
      },
      {
        test : /\.css$/,
        use: ['style-loader', 'css-loader', 'postcss-loader']
      }
    ]
  },
  externals: {
    prestashop: 'prestashop',
    $: '$',
    jquery: 'jQuery'
  },
  plugins: [
    new ExtractTextPlugin(path.join('..', 'css', 'theme.css'))
  ]
};

config.plugins.push(
  new webpack.optimize.UglifyJsPlugin({
    sourceMap: false,
    compress: {
      sequences: true,
      conditionals: true,
      booleans: true,
      if_return: true,
      join_vars: true,
      drop_console: true
    },
    output: {
      comments: false
    },
    minimize: true
  })
);

module.exports = config;

Can you help me with development version? I tried to change it in many ways as different plugins suggest, but nothing works. How am I suppose to turn on sourcemaps, so that my devtools showed style properties in .scss files instead of .css?

Edited by Sharak
this forum theme is f***ng ridiculous!!! could make reference to user but after that can't do anything else on Firefox. Cursor is just stuck inside. WTF!?!?!? Bring back the old forum!!! (see edit history)
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...