Archive for the OXID Entwickler Category

Apache – Negotiation Error in OXID eShop

Recently we faced strange error called “Negotiation Error” while working with OXID eShop:

[negotiation:error] [pid 5632] [client 192.168.1.118:43532] AH00687: Negotiation: discovered file(s) matching request: /var/www/html/oxid497/out/pictures/generated/manufacturer/icon/100_100_100/symbol(2).jpg (None could be negotiated)

On researching we found multiple solutions and reasons for the error. But none fit the case we were facing. Finally we found one perfect reason for the error.

According to Apache Content Negotiation:

If the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client’s requirements.

​So we checked in /etc/apache2/sites-available/000-default.conf and found

Options Indexes FollowSymLinks ​MultiViews​

..added to it.

Upon removing the keyword MultiViews and restarted Apache2. It worked perfect!!

Reference

Device Permissions in ShopManager™

Owing to a very good question from Sven Brunk on Google+, about why ShopManager™ for OXID seeks the device-permissions it does during installation, we decided to be open about it, and document the reasons for seeking each one of those permissions in this blog-post.

This is one aspect we haven’t paid much attention to as we developed the app, casually helping ourselves all the device-access we needed. But we know better to appreciate users’ concerns about smartphone-apps gaining inappropriate access to user-data on the phone. So here we make a commitment that we will not take any access to the device that we do not absolutely need to enable a particular feature of ShopManager™.

These are the permissions that ShopManager™ requires in the current release 4.6 as of 01.01.16.

ShopManager OXID Permissions in Ver. 4.6

 

Location – Standort

There is a feature on the product-roadmap to help owners of the shops using ShopManager™ to determine how far they are separated from customers buying products from their online-shops. This helps them organize better logistics, and if applicable, offer pick-up services at physical-shops or warehouses (pickup-points).

Location information on Android is obtained using two methods:

  • WLAN/Network (GeoIP, coarse_location)
  • GPS localization (fine_location)

Phone – Telefon

Managers of online-shops can phone customers directly from the app, for example while reviewing an order, to offer support. This feature will stay.

Photos/Media/Files – Fotos/Medien/Dateien

ShopManager™ allows to access pictures from the device and apply them to article-data on the shop. This way shop-owners benefit from the ability to instantly upload pics from the the smartphone to the webshop.

Camera – Kamera

ShopManager™ allows to snap a picture of the product using the smartphone camera and allows for images to be uploaded to webshop instantly.

Device ID and Call Information – Geräte-ID & Anrufinformationen

This feature is required by Google Play to manage the app across multiple devices as also triggering ACRA (Application Crash Report for Android). These permissions will stay.

Contacts – Kontakte

Grants us access to address-book of the smartphone, which could help us reach new users virally.  This was an original feature-decision, which we will review in the next releases. Also this feature will be reviewed in next releases.

  • Access to Contacts / Kontakte has been removed in version 4.6.3

Identity – Identität

Grants us identity-information of users via our Google Play developer-account.  This was an original feature-decision, which we will review in the next releases.

Stay tuned to weekly releases on Google Play, and let us know what you think on the OXID eSales G+ Community.

References

Official System Permissions information for Android Developers

Quality Code Metrics: Measure it to Master it!

euroblaze-programming-quality-measurement

After over 6 months of development of our flagship Android product for E-Commerce, the ShopManager™ for OXID e-Shop, our marketing-team was surprised at the number of times the App crashed in real use-cases, in spite of our technicians’ best efforts to make stable releases.

We were running high on development cost of the product, and low on time for taking the product to the market. There was a dreaded desperation in the product-team, to fix it’s quality problems, not knowing quite which end of the beast to exactly start from!

At this time, we decided to take a structured approach to breaking down the product’s quality problems, which lo and behold, stemmed from an ambitious feature-plan that had to be accomplished in limited time, on the way introducing a huge amount of technical debt.

We started to measure the most significant metrics using formal static-code-analysis methods and tools, primarily focusing on:

  1. Blocking, Critical and Major code-deficiencies
  2. Technical Debt (in % of total code produced)
  3. Code-Complexity
  4. Lines of Code-Duplications

In addition, we decided to chase a couple of soft-goals (for the time being):

  1. Reduce number of lines of code
  2. Increase the comments-to-code ratio

We dedicated all the developers in the product-team to the single goal of improving these metrics. Our target was to achieve 0 Blocking, 0 Critical and 0 Major issues, 1% Technical-Debt and 1% Code-Duplication**.
The results were amazing.

Within 2 weeks, the product started to show visible signs of stability. Beta users started to give positive feedback. Code-metrics were starting to look acceptable, and to the date of this note stood at 0.8% Technical Debt (down from 7.3%), 1.1% Code-Duplication (down from 16.5%) and 0 critical-issues (down from 15), as also a small drop in the total lines-of-code.

The ShopManager™ product-team now takes great pride in having solved a relatively big quality problem in a methodical fashion, resting-assured that the learnings will be transferred to new Apps we shall be developing in future.

On the subjects of quality & product-perfection you are never really done. We are committed to developing a deeper understanding of Code-Complexity and mark it as the next metric to master. Similarly the ShopManager™ product-team is inspired to compare this product’s code-metrics with the most used Androids Apps, such as Firefox for Android.

Join us!

The topic of static-code-analysis will be discussed at the PHP-Usergroup-Stuttgart on 10.02. If you’d like to be there, here’s where to register!

Wenn Kunden die Lust am Online-Shoppen Verlieren

Online-Shopping soll das Leben vereinfachen. Das jedenfalls wünschen wir uns alle. Die Realität sieht jedoch oftmals anders aus:

  • Aufwändige Login-Prozesse
  • Session timeouts
  • Identifikationsroutinen
  • Lieferbedingungen

Google Analytics hat mit dem folgenden lustigen Video den Nagel auf den Kopf getroffen. Viel Spaß beim Anschauen und darüber nachdenken, wie Sie Ihren Kunden den Einkauf leichter gestelten können!

FREE Script for taking OXID Database Dumps

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

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

OXID CE 4.5.2 on Virtual Machine

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.

OXID VM 2.0 for Python Scripters

Python-scripters can have a lot of fun with the OXID Virtual Machine 2.0 since it comes pre-installed with the Python Interpreter.

Infact the Management Console for this VM has been written in Python, source code of which can be viewed on our public SVN.

OXID Template Customizations at Flat-Rate

For the first time in the industry, we are pleased to offer OXID template-customizations under a FLAT-RATE model.

This novel business model offers our customers, speed and cost-efficiency of delivering OXID based shops. In general, shops are produced within 4-5 days after PSD design is delivered, including production of XHTML/CSS, multiple-browser compatibility and SMARTY template customization.

For more details, please visit: euroblaze OXID e-Commerce Development Services

OXID VM 2.0 – Virtual Machine Reloaded!

We are all excited about releasing the OXID VM 2.0 in the next days, the successor to the existing VM.  We’ve added several new features to the VM 2.0, including a management-console for quick access to day to day functions that OXID-programmers use.  At the same time, we’ve moved to VirtualBox, from it’s previous incarnation on VMWare.

Over the next few weeks, we’ll be blogging about individual features, so please watch this space for new stuff.  You can also follow us on Twitter with hashtag #OXID_VM.

System

This Virtual Machine is based on:

  • Debian GNU/LINUX 6.0.2 (Squeeze)
  • Kernel 2.6.32-5-686

Minimum Recommended Hardware

  • Single or Dual Core processors of up to 4.x GHz
  • 4 GB RAM
  • 20 GB Disk (VM performs faster on SSD)

Download

The OXID VM 2.0 is available for download over HTTP.  Filesize 874 MB (courtesy of the cloud service Dropbox).

This version of the OXID Virtual Machine comes with it’s own Management Console.  The source-code for the MC can be viewed on our public SVN.

Virtual Machine Player – VirtualBox

Here’s where you can get the VirtualBox Player for running this virtual-machine in Windows, OS X, Linux and Solaris host-operating-systems.

Discuss

There are surely bugs and features-wishes which we might have overlooked.  We would love to have you participate in the development of this VM.  Please join us at the OXID e-Shop Virtual Machine mailing list and send us tons of feedback!

Page 1 of 41234