Thursday, September 30, 2010

Zencart Buttons - new and improved

Zen carts default buttons are functional, but a touch bland and dated, stylewise at least, so when i was browsing the forums i saw a post by Torvista saying that he had updated the Zen button construction kit to work with php 5.3, but was having issues with accents (Çüæ etc) in 5.3 i thought i would have a look at it, and it is kind of cool.

Anyway getting accents to work was a doddle, as i had encountered this before, basically the script was using html names like À instead off html numbers like À for the character À, so that turned into a nice easy thing to fix.

Then being the anally retentive person that i am i decided that getting transparency o around the png buttons would be a good idea, that took quite a while, I got it working fairly quickly, but it broke the gif and jpeg script, so i ended up going back to the drawing board, and rewriting my fix, so it works without stuffing up jpeg and gif generation.

I also added a switch on the front end so people could select to generate admin or shop buttons, as originally you needed to rename a file everytime you wanted to generate one or the other, this was made heaps easier as torvista had set it so that admin and shop buttons were saved to different directories.

and then i submitted it as an update to zencart and it got accepted

 And by the time you read this there will be another version available, Divavocals and Torvista, did some more work on it by making the structure more logical, and also making the interface tabbed for easier use.

But the big thing coming up in the new release, well OK the bit i did, is you can now create your own button with your own test on it, and if you want you can select an icon to go on it

 So keep an eye out for it coming to a zencart repository near you :)