OXID e-Commerce Admin, User and Developer Blog

euroblaze | OXID e-Commerce User Blog



FREE Script for taking OXID Database Dumps 1

Posted on January 17, 2012 by Ashant_Chalasani

To prepare for that day of  disaster when your server crashes and your web-shop gets erased from the face of the Internet, we are happy to be giving away a free script for taking database dumps in an automated fashion (using cron) of your OXID e-Shop databases.

The script is written in Python, and has been tested to run on any LINUX machine supporting the language.

The code can be downloaded from code.google.com.

USAGE

shell$: eb_takedbdump.py -e <env> -s <shoproot>

Where

<env> = Any environment label to signify the environment where the shop is running.  Typically you’d set prod, dev, staging, vm and such values.  This value is then appended to the filename of the dump that is produced.

<shoproot> = the root folder where the core/ shop files reside (along with config.inc.php, .htaccess etc)

Working

Once the script runs successfully, you can expect 2 things:

  1. A database dump file with the name dbname_env.sql (See Usage above for <env>).  dbname is the shop’s database name from config.inc.php
  2. A log file called eb_takedbdump.log in <shoproot>/log/

You will have to make sure to set the permissions on database/ and log/ directories appropriately in case the script is being as a different user than the one owning the shop-directories.

REQUEST to Users

If you use the script, we would be thankful if you can mention (by email or comment below) in which server-environment and hoster you are successfully (or unsuccessfully) running this script.

We’ve got it to run on below environments until now:

  1. Linux server000-han 2.6.99.8intel #1 SMP Sun Oct 30 22:38:04 CET 2011 x86_64 GNU/Linux (Profihost hosting account)
  2. Linux xxx 2.6.26-2-amd64 #1 SMP Mon Jun 13 16:29:33 UTC 2011 x86_64 GNU/Linux (dedicated Debian 5.0.9 Server)
  3. OXID Virtual Machine 2.0

Next Steps

As todos for the next version we are collecting the following list:

  1. Support mentioning log-level as a CLI input parameter
  2. Support a CLI parameter for rsync-ing the dump-file with an rsync-server
  3. zip or gz the dump so that it’s more transportable (ex. to a back-up server by rsync et al)

xdebug on OXID Virtual Machine 2

Posted on December 11, 2011 by Ashant_Chalasani

Since the OXID VM is a good PHP developer tool, it would be great to have the xdebug enabled by default.  Until XDebug starts to comes pre-installed on the OXID VM, it can be installed on the VM’s in use, using:

apt-get install php5-dev

In your /etc/php5/apache2/php.ini, please insert either of these lines to load the xdebug.so shared object.

root@oxidvm:# find / -name 'xdebug.so' /usr/lib/php5/20090626+lfs/xdebug.so

zend_extension_ts=/usr/lib/php5/20090626+lfs/xdebug.so (for threaded use  of PHP) or
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so (non threaded use)

xdebug for OXID Virtual Machine

xdebug for OXID Virtual Machine

Making Parent-Articles of OXID Variants (non)-Buyable 0

Posted on October 17, 2011 by Ashant_Chalasani

If you have product catalog that contains many articles with many variants, or variant-combinations, it may be necessary to set the parent-product as non-buyable, because only variants can be purchased.  Classical example, a t-shirt in different colors and sizes.  Unless a color and size is not selected, the product cannot be purchased!

OXID offers a configuration-setting for this purpose which would allow the shop-merchant to set up products with variants as non-purchases.  This setting is applicable shop-wide, and can be found under Master Settings > Core Settings > System > Variants > “Parent” Products can be purchased.

For more on OXID Variants, please also see Setting up Product Variants in OXID.

Using JQuery Date-Picker in OXID Admin 2

Posted on September 30, 2011 by Ashant_Chalasani

To get datepicker feature to text box it is not required to write entire script for date picker since it is already available in jquery library need to include that library into our tpl file directly.Here the follow the process to get datepicker to any text box.

Adding Javascript to headitem.tpl

Add the following JS in ~/out/admin/tpl/headitem.tpl within the <head> tag.

<!--DatePicker code//-->
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(function() {
  $( "#datepicker" ).datepicker({
    showWeek: true,
    firstDay: 1,
    dateFormat: 'yy-mm-dd'
  });
});
</script>
<!--end of date picker code.//-->
  • showWeek displays the calendar week-number, and can be set to true/false.
  • dateFormat can be set to the format your back-end processing scripts expect.  We simply use the ISO 8601
  • For other configuration settings, please refer to the UI/API/1.8/Datepicker (or the newest version) documentation

Calling the Date-picker Functions from the OXID e-Shop

Once loaded into headitem.tpl, the the date-picker function can be called from anywhere in the OXID e-Shop /admin Area by simply adding id=”datepicker”.  Example

<input id="datepicker" type="text" />

Final Steps

  • Clear your ~/tmp folder to reflect the changes
  • Empty your browser-cache

OXID CE 4.5.2 on Virtual Machine 1

Posted on September 18, 2011 by Ashant_Chalasani

The newest OXID CE 4.5.2 has been updated on the OXID Virtual Machine 2.0 Repository.  You can update this on your VM using the “VM/Available OXID Versions Update” menu point on the Main Menu.

Here are the 3 steps involved with updating your VM.

If you should have any questions regarding the VM, you may post them on the mailing list, or drop a comment here below.



↑ Top

Switch to our mobile site