CMS

គោលបំណងដែលនាងខ្ញុំបង្កើត Page CMS នៅក្នុង Blog (naisimsin.blogspot.com/​) គឺ​ដើម្បី​ភាពងាយ​ស្រួល​ក្នុង​ការ​សិក្សា​រៀន​សូត្រ​គ្រប់ CMS E-commerce ដែល​ល្បីៗ និង​និ​យមប្រើ​ប្រាស់​លើ​បណ្ដាញគេ​ហ​ទំព័រ E-commerce ។ ដូច្នេះ​ហើយ​ទើប​នាង​ខ្ញុំ​ខំស្វែង​រក​ឯក​សារ​ដែល​ពាក់​ព័ន្ធ​ក្នុង​មូល​ដ្ធាន​គ្រឹះ របស់ ​CMS E-commerce ផ្ដុំ​ឡើង​តែ​​មួយ​ រួម​ជា​មួយ​កត្តា​ផ្សេង​ៗទៀត ដូចជា​ ផ្ដល់​ភាព​ងាយ​ស្រួល​ដល់បុគ្គល​ដែល​មាន​បំ​ណង​ចង់​សិក្សា​មូល​ដ្ធាន​គ្រឹះ របស់ CMS E-commerce​ នឹង ម្យ៉ាង​ទៀត​ទោះ​នាង​ខ្ញុំទៅ​ដល់​ទី​ណា​ឯក​សារ​នេះ​តែង​តែ​នៅ​ជា​មួយ​នឹង​ខ្ញុំ​ជា​និច្ច។

Initialization simpleCart(js)  

simpleCart(js) requires using jQuery, Prototype, or Mootools. No extra configuration is needed as long as one of them is included on the page
Quick Start
Add the script to your page and set your checkout method
  1. <script src="simpleCart.js"></script>
  2. <script>
  3. simpleCart({
  4. checkout: {
  5. type: "PayPal",
  6. email: "you@yours.com"
  7. }
  8. });
  9. </script>
To sell items from your “Shelf”, just add some classes to your html like this:
  1. <div class="simpleCart_shelfItem">
  2. <h2 class="item_name"> Awesome T-shirt </h2>
  3. <p> <input type="text" value="1" class="item_Quantity"><br>
  4. <span class="item_price">$35.99</span><br>
  5. <a class="item_add" href="javascript:;"> Add to Cart </a></p>
  6. </div>
Then just add classes where you want your totals to show or have your checkout buttons:
  1. <span class="simpleCart_quantity"></span> items - <span class="simpleCart_total"></span>
  2. <a href="javascript:;" class="simpleCart_checkout">Checkout</a>
That’s it!  See below for options you can set, and take a look at the checkout methods and different customizations available.
You can set/change simpleCart options at any time:
  1. simpleCart({
  2.     option1: "value" ,
  3.     option2: "value2"
  4. });
Here are the possible options and their default values:
  1. simpleCart({
  2.     // array representing the format and columns of the cart,
  3.     // see the cart columns documentation
  4.     cartColumns: [
  5.         { attr: "name", label: "Name"},
  6.         { view: "currency", attr: "price", label: "Price"},
  7.         { view: "decrement", label: false},
  8.         { attr: "quantity", label: "Qty"},
  9.         { view: "increment", label: false},
  10.         { view: "currency", attr: "total", label: "SubTotal" },
  11.         { view: "remove", text: "Remove", label: false}
  12.     ],
  13.     // "div" or "table" - builds the cart as a
  14.     // table or collection of divs
  15.     cartStyle: "div",
  16.     // how simpleCart should checkout, see the
  17.     // checkout reference for more info
  18.     checkout: {
  19.         type: "PayPal" ,
  20.         email: "you@yours.com"
  21.     },
  22.     // set the currency, see the currency
  23.     // reference for more info
  24.     currency: "USD",
  25.     // collection of arbitrary data you may want to store
  26.     // with the cart, such as customer info
  27.     data: {},
  28.     // set the cart langauge
  29.     // (may be used for checkout)
  30.     language: "english-us",
  31.     // array of item fields that will not be
  32.     // sent to checkout
  33.     excludeFromCheckout: [],
  34.     // custom function to add shipping cost
  35.     shippingCustom: null,
  36.     // flat rate shipping option
  37.     shippingFlatRate: 0,
  38.     // added shipping based on this value
  39.     // multiplied by the cart quantity
  40.     shippingQuantityRate: 0,
  41.     // added shipping based on this value
  42.     // multiplied by the cart subtotal
  43.     shippingTotalRate: 0,
  44.     // tax rate applied to cart subtotal
  45.     taxRate: 0,
  46.     // true if tax should be applied to shipping
  47.     taxShipping: false,
  48.     // event callbacks
  49.     beforeAdd            : null,
  50.     afterAdd            : null,
  51.     load                : null,
  52.     beforeSave        : null,
  53.     afterSave            : null,
  54.     update            : null,
  55.     ready            : null,
  56.     checkoutSuccess    : null,
  57.     checkoutFail        : null,
  58.     beforeCheckout        : null,
  59. beforeRemove : null
  60. });

Installing OpenCart

This guide will walk you through how to successfully install and uninstall OpenCart.

Downloading and unzipping OpenCart archive

The latest version of OpenCart (v.2.0.3.1) can be downloaded from the OpenCart website (recommended) or directly from github. The download page also offers access to previous versions of OpenCart. Under the Downloads column, locate v2.0.3.1 and press the “Download” link directly across from it under the Action column. This will download the compressed archive of that version of OpenCart in a zip file. For OpenCart version 2.0.3.1, a file named “opencart_v2.0.3.1.zip" will be downloaded.
When opening the zip file, the following files will be visible:
  • "upload" folder
  • "license.txt" file
  • "readme.txt" file
The "upload" folder contains all the files needed to upload OpenCart to a web server. The "license.txt" file contains the license agreement regarding the use of OpenCart on your site. The "readme.text" file provides links to the current install and upgrade instructions on the OpenCart website. When you are ready, you can extract the files from the zip file to a location of your choice on your computer.

Uploading OpenCart

At this step you should have a web server established and the OpenCart archive extracted. We will now use File Transfer Protocol (FTP) client to upload these uncompressed files to a web server.

Installing and configuring the FTP client

We recommend using Filezilla as your FTP client. Filezilla is a free FTP client that will transfer the OpenCart files to any web server specified. The FileZilla client (not the server) can be downloaded from http://filezilla-project.org/ and installed onto a computer.
When you open Filezilla you should see your computer's file directory on the left side. The next step is to locate where you saved the uncompressed OpenCart archive and click on the "upload" folder, and the files should appear below it. The directory needs to be left open as we continue. The right hand side is blank at the moment because the target website hasn't been connected to. When connected it will display the file directory of the web server.
filezilla disconnect
Before we continue, we need to make sure that you have the following information about your website:
  • the host name
  • username
  • password
This information can be obtained by contacting your hosting provider.

Connecting to the Site Manager

Under the “File” menu, “Site Manager” should be opened in Filezilla. A window will pop up with the General tab open. You should fill in the information gathered above regarding hosting information, and press “Connect”. The right “Remote Site” side will now display the file directory of your website.
filezilla site manager

Uploading OpenCart's files

If you haven't already located the OpenCart upload folder on the left side, you need to do so now and keep it open. In the Remote Site directory (right side), you need to open the folder that the OpenCart shop will be located in. The location of shop varies based on whether the you want the shop to be seen on the main page, a sub-folder, a subdomain, etc. If you want to make OpenCart the main page, you would need to upload files to the root folder of their website.
Once the location of the OpenCart shop has been determined, all the content within the “upload” folder on the computer's (left) side of Filezilla must be selected, right-clicked, and uploaded. Uploading all the files might take a few minutes on the FTP client.
After Filezilla finishes uploading the files to the location specified, you should see the same files on both the left side(computer) and on the right side (the website); as seen in the screenshot below:
filezilla file transfer-png
The Filezilla window should look similar to the above image (minus some directory details). This means that the OpenCart files were successfully transferred the target site. The site now contains the files necessary to setup an OpenCart shop.

Creating a database for the shop

The next step is to create a database on the MySQL server for OpenCart to store a shop's data on. You should log into the site’s control panel and locate MySQL Databases. Using MySQL Databases, you can create a new database by entering a database name and a username/password to access this database. The user that was just created needs to be added to the database, along with enabling all of the necessary permissions. We will use this database information later when we are configuring OpenCart using the auto-installer.

Launch the auto-installer

With a new database freshly created, we are now ready to install OpenCart directly onto a website. You should open up a web browser and enter in the web address of where they uploaded OpenCart. If the "install" folder in "upload" was uploaded correctly, you should be automatically greeted by the following page:
opencart step1
This page is the installation page. The following steps will help you complete the installation process for OpenCart.

Step 1. License

You may read through the license, check "I agree to the license", and press “Continue”.

Step 2. Pre-Installation

This step checks to see if the web server has the technical requirements and correct permissions to setup OpenCart properly. If red marks are visible on #1 or #2, you need to make sure that these components are properly installed onto the web server. You should contact your hosting service if there are any issues with this. If there are red marks on #3 or #4, there might have been an issue with uploading the files using the FTP client. If everything is configured correctly and green marks are visible (as seen below), you may press "Continue".
opencart step2

Step 3. Configuration

You need to fill in the spaces below #1 by adding the database connection details (username/password, database name) established when you created the store's database using MySQL Databases. Under #2, you should create a new username and password for administration access to the OpenCart shop. When finished, you may press "Continue".
opencart step3

Completing the installation

 

Step 4. Finished

Now that installation is complete, the "install" folder is no longer required. You should delete the “install” folder in the Remote Site section of Filezilla for security reasons. You now have the option to browse the frontend of your shop or choose to log into the administration side.
opencart step4
After the install, you should make the necessary steps towards improving the security of your server and OpenCart store directory. These steps are detailed in Basic security practices.

Installing vQmod

vQmod for OpenCart lets you add modules to your store without modifying the core OpenCart code. See vQmod for more information on how to download and install vQmod for your store.

Updating OpenCart

OpenCart releases new versions from time to time with updated features and bug fixes. To learn how to update a store from an earlier version of OpenCart, visit Updating OpenCart.

Uninstalling OpenCart

Uninstalling OpenCart is a quick and simple process.
  1. Delete the files/folders in the location you uploaded them to in Filezilla.  
  2. Delete the OpenCart database from MySQL Databases or phpMyAdmin.
ឯកសារយោងពីគេហទំព័រ :docs.opencart.com/installation/

1 comment: