Laravel Valet for OpenCart 2.x using Custom Valet Drivers

Using Laravel Valet with OpenCart 2.x?

I am taking a while to understand how the valet custom driver work for my own OpenCart project.

1. My OpenCart project is located at ~/Sites/myshop (myshop is my folder name, it is very important how you name your driver)
2. Go to ~/.valet/Drivers/
3. Create a file name MyshopValetDriver.php
4. Template you can reference here. Laravel Valet for OpenCart 2.x
5. Tata, your Opencart now support SEO URL with Laravel Valet.


Valet Version: v2.0.5
Opencart Version: v2.3.0.2 (It will works on any Opencart 2.x version)


AJAX 500 Internal Server Error, Opencart AJAX 500 error return

I migrate a OpenCart2 website from cPanel to AWS. That’s means no beautiful interface for me to drag and drop. Now need to deal with SSH.

Everything was worked fine in my old hosting. However this weird 500 Internal Server Error keep bother me.


As I google around the stackoverflow. Most of them said that is my PHP script error to generate this 500 Internal Server Error. My script is exactly same as my old website.

From the Google Chrome inspect Network tab, the AJAX request have correct response but it just have the 500 HTTP Code.


End up I found it is because of the permission.

Make sure you have the write permission for the error.log and openbay.log

  • /system/storage/logs/error.log
  • /system/storage/logs/openbay.log

I set the file permission from 644 to 664.

Then this 500 Internal Server Error was removed. The issue it is because the script cannot write to the file.

OpenCart Import/Export tools _x000D_

Import Excel having _x000D_ string

I had migrate one of my OpenCart store from to There are a major upgrade between the data structure. I do have to export the database and manually match the few and import back to the latest version.

After I successfully import to the system. I found that the new line / line break / paragraph show up the funny string which is “_x000D_”. I have no idea where is this character came from. I checked the Excel File, there is no such character there. I try to reimport again. The problem still occurs. Hence, I try Google with this issue.

This is what the author of the extension reply on this issue:

by JNeuhoff » Wed Sep 17, 2014 11:04 pm

Please try our new version 2.3 which should fix the issue with the missing product option values.As regards the file size: XLSX tends to be larger than the old XLS format. However, you can export in smaller batches, edit, and then re-import.

As regards the


This might be a bug with MS Excel. Do you have the same problem when using OpenOffice or LibreOffice?

He claimed that it is might be a bug of the MS Excel that means I don’t think he will take time to fix it. So the problem is from MS Excel. So I try to solve it with MS Excel.

The Solution:

Previously the extension for is exported with xls extension. However, the latest version is export to xlsx extension.
What I do is I open the xlsx exported file and save it to xls again. I try to import again. Voilà the _x000D_ funny string no more.
If you have the similar problem try to save in to old version of the Excel. It might solve your problem.
Happy Coding~

Background for the Import / Export Tools

The Import/Export Tool allows the admin user to do a bulk export of all the categories, products, and product options to an Excel spreadsheet file. The spreadsheet file can be edited offline and then be re-imported to the OpenCart database.

It is very useful extension for you to manage your products.