Here's a good guide how to develop a simple plugin. The goal is to display random slogans where the logo is. The logo locates at the top left of the pages of Shopware.
Follow the guide and in the end zip the SwagSloganOfTheDay folder. Then login to the backend of Shopware, go to Plugin-Manager -> Local extensions, choose the .zip file and click the Install button.
Friday, November 28, 2014
Great references for our project
Here you can find valuable references for developing plugins for both the frontend and backend of Shopware.
Saturday, November 22, 2014
MVC in practice
Here's a great link to a tutorial for implementation of MVC with the Zend framework. The tutorial is given in two parts. You will learn how to set up the database and create necessary php and phtml files in order to implement a simple MVC with the Zend framework.
Thursday, November 13, 2014
MVC
It's crucial to study the MVC design pattern carefully because Shopware is based on MVC. Surely, if we get to know the concept right now, we'll get less into trouble later during the implementation. Here's a great post, but in German! In the following, I write down what I learned from the post:
Model:
provides data (either from the database or simple arrays) for the controller.
View:
is a layer between the controller and the template. The view receives the data from the controller and embeds them in the template. What user sees in the browser is the content of the template in which the data are assigned to the variables.
Controller:
- Gets the parameters of the request.
- Gets the data from the database and send them to the view.
- Decides what template should be loaded.
Model:
provides data (either from the database or simple arrays) for the controller.
View:
is a layer between the controller and the template. The view receives the data from the controller and embeds them in the template. What user sees in the browser is the content of the template in which the data are assigned to the variables.
Controller:
- Gets the parameters of the request.
- Gets the data from the database and send them to the view.
- Decides what template should be loaded.
Monday, October 27, 2014
Shopware specifications
Language: PHP
Framework: Enlight (developed by Shopware AG) which is based on Zend and Symfony 2
Database: MySQL
Framework for the templates: Smarty
Development of JavaScript components by: jQuery and ExtJS
Versions management by: SVN-repository and Github
Framework: Enlight (developed by Shopware AG) which is based on Zend and Symfony 2
Database: MySQL
Framework for the templates: Smarty
Development of JavaScript components by: jQuery and ExtJS
Versions management by: SVN-repository and Github
Sunday, October 26, 2014
Controllers
Controllers receive and process requests. They also have access to the database.
The indexAction() function of a controller is called when no other action is specified in the request.
What does a request look like? Here's an example: https://accounts.google.com/signup.
The indexAction() function of a controller is called when no other action is specified in the request.
What does a request look like? Here's an example: https://accounts.google.com/signup.
Monday, October 20, 2014
Directories of Shopware
The backend modules of Shopware are saved at templates/_default/backend.
The design pattern of the backend modules is MVC. By this design pattern, the business logic is separated from the view of web applications.
The most important directories are located in the folder /www/engine/shopware.
ORM Doctrine is used for the models. What is an ORM? How does it work?
The design pattern of the backend modules is MVC. By this design pattern, the business logic is separated from the view of web applications.
The most important directories are located in the folder /www/engine/shopware.
ORM Doctrine is used for the models. What is an ORM? How does it work?
Thursday, October 16, 2014
Directories of Shopware
It seems the Controllers, Models, Components and Templates directories are among the most important directories of Shopware.
I like the word "thumbnail"! I didn't know that it can be anything with a small size.
Media Manager, on the backend, gets the documents you upload and saves them in the Media directory. It seems Media Manager doesn't recognize .txt files.
I like the word "thumbnail"! I didn't know that it can be anything with a small size.
Media Manager, on the backend, gets the documents you upload and saves them in the Media directory. It seems Media Manager doesn't recognize .txt files.
Monday, October 13, 2014
Categories
The system category's name is Shopware. It has two subcategories called English and German.
You should install and activate the AdvancedMenu plugin in order to get the subcategories in the top menu displayed.
Categories at level 0 must have at least one subcategory. Plus, you can't assign a category to an item if the category has subcategory.
Why do we need caching?
To avoid inquiring about particular data repeatedly from the database, we read the data from the cache. Caching improves a website's performance. How is performance defined?
You should install and activate the AdvancedMenu plugin in order to get the subcategories in the top menu displayed.
Categories at level 0 must have at least one subcategory. Plus, you can't assign a category to an item if the category has subcategory.
Why do we need caching?
To avoid inquiring about particular data repeatedly from the database, we read the data from the cache. Caching improves a website's performance. How is performance defined?
Tuesday, October 7, 2014
More about items
You can delete an item that you're now creating. It will be removed from database. Task: look at the code and the connection between the "delete" button and the database.
The feature of activating/deactivating (through a check box) an item is interesting. An item can be deactivated and therefore will not be displayed. Nevertheless, it is still in the database.
You can assign more than a category to an item.
Task: how does picture (an item's picture) uploading work? Look at the code carefully.
The feature of activating/deactivating (through a check box) an item is interesting. An item can be deactivated and therefore will not be displayed. Nevertheless, it is still in the database.
You can assign more than a category to an item.
Task: how does picture (an item's picture) uploading work? Look at the code carefully.
Monday, October 6, 2014
Snippets
Shopware provides email notification for the items you ordered that are not currently in stock. An email will be sent to you if the items are available again.
Snippet = a small piece of information.
Shopware alerts appropriate snippets for stock levels. For example, if stock level > 0, the default snippet will appear on the item page: "Ready to ship today. Delivery time approx. 1-3 work days.". You can edit snippets on the backend.
Task: study templates carefully. An item's data are displayed through templates. How?
Snippet = a small piece of information.
Shopware alerts appropriate snippets for stock levels. For example, if stock level > 0, the default snippet will appear on the item page: "Ready to ship today. Delivery time approx. 1-3 work days.". You can edit snippets on the backend.
Task: study templates carefully. An item's data are displayed through templates. How?
Sunday, October 5, 2014
Create an item
5 steps to create an item:
1) Give basic data.
2) Give price.
3) Give description.
4) Assign a category to the item.
The category shouldn't have a subcategory.
5) Upload a picture.
............
Variant item:
An item could be a piece of cloth in three different colors. The item numbers are different in this case.
TinyMCE:
Shopware uses the TinyMCE editor. The editor is available for the description of items. Read more at wiki.shopware.
1) Give basic data.
2) Give price.
3) Give description.
4) Assign a category to the item.
The category shouldn't have a subcategory.
5) Upload a picture.
............
Variant item:
An item could be a piece of cloth in three different colors. The item numbers are different in this case.
TinyMCE:
Shopware uses the TinyMCE editor. The editor is available for the description of items. Read more at wiki.shopware.
Wednesday, October 1, 2014
Hello Shopware
Shopware has released a package that contains Shopware's source code and UwAmp. UwAmp is a local Apache server. It runs only on Windows. I have Windows 7 on my laptop.
I've started a project officially from today. I should develop a plugin that provides fields on the backend of Shopware. The input of the fields can be banners, texts, videos, etc. Next to each field there should be a check box "active/inactive" to activate or deactivate the chosen medium. These media are attached to the description of items.
I installed the PHPStorm IDE for my future work and imported Shopware to the IDE. I set the Shopware project as a "PHP web application".
I've started a project officially from today. I should develop a plugin that provides fields on the backend of Shopware. The input of the fields can be banners, texts, videos, etc. Next to each field there should be a check box "active/inactive" to activate or deactivate the chosen medium. These media are attached to the description of items.
I installed the PHPStorm IDE for my future work and imported Shopware to the IDE. I set the Shopware project as a "PHP web application".
Subscribe to:
Posts (Atom)