Prestashop and express checkout

January 30, 2010 – 6:58 pm

Ion_cannon released his express checkout for Prestashop a while ago, but I haven’t tried it yet. Now that Prestashop has moved up to 1.3 alpha, I guess version 1.2.5 must be pretty stable by now. So, I guess now is a good time to try the new module.

I haven’t used any modules other than the ones that come with the installation, so hopefully this will be a piece of cake to install and use. I’m running a pretty plain installation with just a few tweaks to the base theme, so I think that will help …

The first step was to move the module files into place. I think by default these (blockmyaccount, blockcart, and blockuserinfo), so I copied them into the modules folder.

The next step was to move the theme files. A lot more files being overwritten in this step …

Next, copy the ‘img/ionexpress’ folder into the ‘img’ folder. No overwriting here.

Next , ‘express-order.php’ and ‘express-cart.php’ are moved to the root directory where other php files are. No overwriting here.

Next, a SQL query was run, “ALTER TABLE ps_customer ADD guest int(1) NOT NULL DEFAULT 0;” This gave the output:
Query OK, 23 rows affected (0.09 sec)
Records: 23  Duplicates: 0  Warnings: 0

Next, a little terminal work to delete the Smarty cache files, “sudo rm /tools/smarty/compile/*.php” from root directory.

Next, some updating of the back office tools … edit “admin/tabs/AdminCustomers.php” … look near the top of the file for “public function __construct()” and add
‘guest’ => array(’title’ => $this->l(’Guest’), ‘align’ => ‘center’, ‘active’ => ‘guest’, ‘type’ => ‘bool’, ‘orderby’ => false),
before
‘active’ => array(’title’ => $this->l(’Enabled’), ‘width’ => 25, ‘align’ => ‘center’, ‘active’ => ’status’, ‘type’ => ‘bool’, ‘orderby’ => false),
Finally, I edited the “themes/express-order.tpl” file to make the “US” the default country. I changed the “                    <select name=”id_country” id=”id_country”>
<option value=”">–</option>
to be
<select name=”id_country” id=”id_country”>
<option value=”21″>USA</option>

Yeah, those are the changes that I made. Now, to see how it looks …


Prestashop duplicate products error

May 2, 2009 – 9:01 pm

The admin tool for Prestashop is slick, but the pure ajax pages slows me down when pages have to refresh. One good thing about zencart was that I could modify attributes without having to load other information about the products. Plus, I could switch from one product to another very easily.

As soon as I add an attribute to a product, like telling the system that I want to sell the mask in blue, the system has to reload a lot of information. So, there’s always a pause before I can add another color mask. It would have been been nice to take an existing product and just duplicate it a few times since practically all the masks have the same colors. Unfortunately, the duplicate product feature isn’t working for me, and I wind up with a “an error occurred while creating object” error message.

It duplicates the product in the “ps_products” and “ps_products_lang” tables, but not in the important “ps_category_product”, “ps_product_attribute” and “ps_product_attribute_combinations” tables. The ps_category_product table is easy to modify and there’s very little needed to get the product into the table. I’ve figured out the other two tables, but they require a little coordination. I’m going to try skipping that routine tonight and try the product attribute import feature. I hope that will make things easier. I really ought to import products to speed things up!

update:
Well, the import of attributes worked once I realized that the fields were separated by semi-colons. I should have figured that out sooner, but when the tool says to import a CSV file, that notion gets confusing. A comma separated file implies that fields are separated by commas! So, I had to load my CSV file in Excel and search/replace the commas to be semi-colons.

So, the import did work, but one problem is that it duplicates options in the database. I don’t need more than one “blue” attribute in the database. It would be nice if it I could have provided the id value for blue instead of it creating a new attribute. So, this isn’t going to work for me.

The answer is straight database hacking inserts for now … The ps_product_attribute table is only important to me for 3 fields: id_product_attribute (auto_increment), id_product, and default_on. So, my insert will just be
“insert into ps_product_attribute (id_product, default_on) values (126, 0)”, and I’ll run that statement for each attribute I want to insert for a product. For the first attribute, I’ll change that 0 to a 1 to designate it as the default attribute. All this does is tell the database that I want to create an attribute for the product, and it produces a primary key id_product_attribute that I’ll use to actually specify what the attribute is.

So, in the “ps_product_attribute_combination” table, I will run
“insert into ps_product_attribute_combination (id_attribute, id_product_attribute) values (75, 245)” where the 75 is the id value for blue attribute, and the 245 is the primary key I just created. If I do this properly, I should be able to have a file with all the insert statements and just run through it all at once. As long as I keep my primary keys in order, this should work. Heh, if it doesn’t work, I’ll have to add an another update to this post!


Aspire One - SSD replacement speeds

April 21, 2009 – 8:48 pm

I downloaded ATTO Disk Benchmark after reading a forum posting that showed someone else’s speeds. So, here are my benchmarks. It’s a 1.5Ghz, 16GB Sandisk Extreme III CF, TinyXP system. The card says 30mb/s, and that’s pretty much what I was seeing


Prestashop Import from Zencart - part 1

April 18, 2009 – 10:15 pm

Tonight, I thought I’d get acquainted with Prestashop. I installed it once before when I was thinking about starting a store for someone. I gave up on that after having to manually create products from static pages. That’s normally something the shop owner would do, but I was trying to create the store in hopes of having the owner pay for it eventually. So, I was going backwards.

For this install, I tried Prestashop with a store that I set up before with Zencart. Zencart works fine, but I guess I wasn’t too interested in the theming part, and I don’t really like the steps to completing a sale. So, the existing store is not very professional looking. It gets the occasional sale, which isn’t stellar, but that’s fine for now since hosting is dirt cheap, and the main avenue of sales is elsewhere. It would, however, be nice to have a better looking site and see if that will increase sales.

So, in comes Prestashop …

Since I’m starting from an existing store, I was pleased to find an OS Commerce to Prestashop import script online. It doesn’t import attributes, but at least it was a start. I don’t know if I should have looked harder for an import script, but oh well …

To import the zencart products (zencart is a modified OSC), I did a mysql dump on the zencart database to a text file. Then, I did a search/replace on the “zen_” to “osc_” which the import script wanted. I also did a “chmod -R 777″ on the os2ps directory to fix some permission problems. Running the script creates 2 sql files in a “generated” directory, one for categories, and another for products.

I ran the category import script without any errors. The product import script had a few problems though due to duplicate keys. I was importing from an older test database, so I don’t know how reliable some of the data is, so this didn’t really bother me. For the item that didn’t import properly, I just edited the sql code to use an id (integer) that wasn’t in use. That fixed the one product, but I had a few more items that also didn’t work. After fixing those, I was able to run the script without errors. Not bad.

When I finally went to the admin site, I could see that there were new categories, but they all had empty names. The sql for the categories had the names in them, so I was a bit confused why they didn’t show up. No big deal … it was easy to edit the missing names. I had to enter short names for the categories anyways, so it wasn’t very much extra work.

The categories showed up with a list of products, and these too had empty names. That again was puzzling since the prices were there. I eventually figured out that the items all were imported with the “id_lang” field set to 2, which is “French”. Since I was viewing the site in English, the site didn’t have the language information for the data in English. So, I ran a simple query to update the “id_lang” to 1 for all the products in the “ps_product_lang” table. Heh, I realized even later that I should have done that to the categories in the “ps_category_lang” table. Now my “ps_category_lang” table has French and English versions of the categories, but I will delete the French ones since they aren’t necessary.

Well, that’s as far as I’ve gotten for now. I have all the products in the database with categories and prices. The next step is to deal with the missing attribute and image data. That will likely be manual.


Aspire One - 16G Compact Flash upgrade

March 14, 2009 – 4:24 pm

I finally bought a ZIF flip cable, and that solved all my problems, as I expected it would. The BIOS recognized the 16G Sandisk Extreme III compact flash card, and the red led light on the card blinked instead of staying lit. All those were good signs that I could finally put away the slow 8G SSD.

The first order of business was then to make the CF adapter fit. I’ve seen various methods of installing the adapter, and they varied in what was cut away. Rather than cut a post, I chose to cut into the unneeded compartment. To do this, I used my dremel tool to cut a small slit into the side. I wasn’t trying to be very precise, and I was suprised that the height of the slit was exactly the same size as my adapter card. I had to widen the slit so that it’d fit, but that was easy. I also cut a small notch to clear the red led. I didn’t want the adapter to move around and bump the led. Finally, I glued a piece of plastic to the case to keep the adapter in place. It seems pretty solid now. I didn’t even have to add any padding to the top or bottom to keep it from rattling.

With the new card, the first thing I did was try to install the XP recovery disk. That went well, but that’ll be another post …

CF card, adapter, ZIF cable

Before cutting a horizontal slit

The adapter held in place with glued down plastic

Installed with motherboard on top

Boot menu

BIOS screen


Long winded update

January 30, 2009 – 1:58 pm

The post installation update of Fedora 10 - Gnome took forever!

One bad thing about the update is that the shut down settings have changed. Before the update, when I chose “shutdown” from the System menu, “hibernate” and “suspend” were options. Now, they aren’t there!

I am thankful that I didn’t have to Google for ages to find how to update the system to use my Dell 1390 card. http://www.fedoraguide.info had all the information I needed, and it was super easy. I’ve read other methods of using fwcutter and other methods to extract drivers from other sources. This was a piece of cake, and easy enough to summarize quickly.

1. install the Fusion repository
su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
2. install the driver
su -c 'yum update'
su -c 'yum install broadcom-wl'

3. configure your system so that the wireless card automaticaly starts
System menu :: Administration :: Network :: click “wlan0″ and then “edit”
check “Controlled by Network Manager” and “Activate device when computer starts”.
4. Restart and test

After restarting,


Trying Fedora 10 on the Aspire One

January 28, 2009 – 1:42 pm

I was using the Ubuntu Netbook Remix for a while. I can say that it suited all my needs and was very efficient about using space. I didn’t have to customize any of the appearance settings at all; it just worked. I think the only downside of my using UNR was my choice of using a lpia kernel and some difficulties in working out getting updates. I’m an Apple fanboy, so not having everything perfect out of the box made things a little trying at times. One of my favorite things about my Apples is that they come out of sleep immediately. Because of this, I don’t care much about boot times.

UNR came out of suspend fairly quick, but I noticed that over a span of days the battery would be depleted. I needed hibernate to be able to keep my battery charge and get back to what I was doing. So, I’m now moving on to Fedora 10 to see how well it performs in this regard.

After my installation last night, my first attempt at hibernating was a fail. It sent me back to the login screen. Suspend worked fine. I wondered if it was because I didn’t have swap space. I tried it again this morning, and the hibernate worked! So, I need to see if it’s a sporadic thing or something resolved itself.

Right now, the AAO is going through its system update. It sure is taking a long time …

I just realized that there is a separate Fedora 10 KDE iso file. One reason I wanted to try F10 out yesterday was because my coworker mentioned that KDE 4.2 just came out. In the Aspire One forums, KDE was mentioned as the faster booting desktop manager, so I think I’m wasting my time right now updating the system. I think it’ll be cleaner to install the KDE version as a default rather than installing KDE on top of the GNOME version.

I suppose I should check to see what version of KDE Fedora 10 is. I highly doubt it’s got KDE 4.2 yet since it just came out yesterday. Maybe I’ll just play with GNOME until I can get a F10 download with the latest KDE.


Writing about the same thing again - installing an OS

January 5, 2009 – 7:24 pm

I just can’t make up my mind … since I can’t seem to get OS X installed on my Acer Aspire One, I’ve gone back and forth with linux operating systems. First I got Ubuntu 8.10 on there, then I added the “netbook remix”, and things were fine and dandy. Then, I tried to get creative by adding a low power kernel to the mix, but that killed my wifi. Not satisfied with the slower load times, I figured I’d go back to Linpus and try some customizations out. Well, that was a bust too because of my new Dell 1390 wifi card. Grr…

So, now I’m back to the remix. This time, I’m installing straight from the remix image and not with 8.1 and the remix on top of that. I read that this would be simpler, so I’m giving it a shot. I also read that with the remix and a low power kernel, the load time was about 20 seconds. Yeah, that’s what I want! I also want everything else to work too … that means wifi, suspend and hibernate.

The only good thing about this process is that the regular installs of Ubuntu and Linpus always work. Why the heck is OS X so much of a problem for me? I’ve got a 8G Lexar CF card in the mail now. It was free after rebate and $5 shipping, so I thought I’d try it. I also want to try a 1.8″ HD, but of course, I don’t want to pay a lot for it considering it may not work. Option 1: buy a broken 30GB ipod and yank the HD, Option 2: eBay …

Note 1: I didn’t pay attention to what I read earlier, but it doesn’t really bother me … Ubuntu Remix is built on top of Ubuntu 8.04 and not the newest 8.10. There are a lot of menu options that I don’t see in the preferences and system menus, but I don’t know if that’s release related …

Note 2: The proprietary driver was listed as “wl”. That didn’t do anything for me, so I removed it and rebooted. The next time around, it found the familiar “bc43″ driver. It was interesting that the install takes you through the use of “bc43-fwcutter”. That’s the same thing I was unsuccessful in doing with Linpus. I guess it just works better in Ubuntu. The process worked, and I had wireless again!

Note 3: I installed the lpia (low power intel architecture??) kernel (http://draecas.googlepages.com/linux-image-2.6.28aaobroadcom_1_i386.deb) successfully with this:
sudo dpkg -i --force-architecture linux-image-2.6.28aaobroadcom_1_i386.deb
One thing that I did notice is that when rebooting, I don’t see the grub screen where I can choose the kernel. I suppose I have to muck around with something to get that grub load screen. No big deal though; I hope to not have various kernels this time. Oh, yeah, the wifi works perfectly too, either be/c this kernel specifically included it, or be/c I got the drivers earlier …

Note 4: I wanted to test the sound, so I tried Pandora. Adobe Flash wasn’t installed, so I had to install that. The plugin wouldn’t install properly because of my “lpia” kernel. Thankfully, I read a bit, and did pretty much the same business with the .deb file I downloaded from the Adobe site:
sudo dpkg –force-architecture -i whatever_the_name_of_the_flash_installer_was.deb
I can report that plugging in headphones worked just fine and also worked after suspend. nice.


Intrepid Ibex Installed!

December 22, 2008 – 8:52 pm

Yahoo! It definitely looks nicer than the stock Linpus operating system, but it also comes at a price … gone is my 15 second boot up time. It sure would be nice to have both a super fast boot up and this nicer OS. I guess I can start reading about stripping the system down for speed. Nah, I want to get the “Ubuntu Netbook Remix” theme going first =)


I give up - apples and oranges

December 22, 2008 – 8:22 pm

I am done for now trying to install OS X on my Acer Aspire One. Maybe I’m not cut out to be a hacker. Well, I didn’t think you had to be a hacker to install OS X on the AAO, but in my case, things just aren’t working out. I guess I’ll check back in the future to see if someone comes up with a super easy no fail install route, like the folks have done with unlocking the iphone. Now, that I can do … and have done.

So, rather than totally give up, I’m now trying my hand at Ubuntu 8.10, Intrepid Ibex. Although I haven’t completed the install yet, my current success in this installation is like comparing apples to oranges. Rather than being met with constant roadblocks, I’m actually proceeding through the Ubuntu install without any problems. Sure, I expect there to be some hiccups, but I think all of those can be resolved after the install. I just passed the 50% mark in this install, and I have high hopes that it will not fail.

The slightly sad part of the whole story is the money I’ve wasted so far. I won’t need the Dell 1390 wireless card for this, so that’s about $20. Then there’s the SanDisk Extreme III CompactFlash card and adapter I was hoping to use instead of the built in SSD. That’s easily $100+ right there. Well, if the rebates on the card(s) come through, then it’s not a big deal. Actually, if the rebates don’t come through, then I’m out $300+ since I bought 3 of them. How do you like them apples!