Archive

Archive for the ‘WordPress’ Category

A word of update, ActiveDealers plugin under dev

December 21st, 2008

It’s been a while since my last post. I simply have to much on my mind and under my fingers, typing all that code. Last weekend I started development of a wordpress plugin I call ActiveDealers. Here are two screenshots for all of you interested in what’s it about.

Dynamic addition of attributes during application lifetime

Dynamic addition of attributes during application lifetime


Entities (dealers) with dynamicly added attributes

Entities (dealers) with dynamicly added attributes

Main idea of building the plugin using EAV database model came from Magento platform. My job focus is entirely on Magento and Wordpress development so some ideas and application design philosophie of Magento seemed so tasty so I decided to implement them in WP plugin. Still need to implement the Google Maps and photo upload to specific dealer (entity), then some testing and possible code refactoring until I release it. Not sure on the license yet. Will keep you posted.

If some of you are looking for a quality custom WordPress plugin development, feel free to contact us at Surgeworks or Inchoo.

Wish you all the best for holidays… Cheers…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

WordPress , ,

WordPress single post templates withouth any plugin needed

November 16th, 2008

Until few days ago I was blabbering around with my friends how I dislike the WordPress due to lack of object oriented programming features and so on. This weekend I revised my thoughts and come to conclusion, once again, how WordPress is great. Sometimes OOP is not the best way to go. And truth be told, OOP CMS solution’s are sometimes far more slower. This weekend I got a whole new look at WordPress and the way of using it. I’ll be working on a project, a community site for my friend and decided to go with WordPress. Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

WordPress , , ,

Magento product image change on color selection

September 29th, 2008

This screencast guides you trough the process of creating a Magento product image change based on color selected in dropdown option. It uses simple jQuery to achieve this functionality.

Sorry for not implementing the video player in site. I am having some minor issues with the wordpress flash player plugin. Hope to fix this soon. In a meantime you can download .swf file provided and watch it on your computer. I tested the video in Media player classic and it works just fine so if your favorite player gives you some trouble, try this one.

Download video MagentoProductColorChooser.swf.

I added the jQuery dropdown logic in special zip file for you to download (dropdown) in case you don’t want to write all the code from scratch. Just be sure to pay attention to id and classes used in my jQuery sample and yours.

And for the media.phtml file, this simple line is the magic one :)

<img src=”<?php echo $this->helper(’catalog/image’)->init($this->getProduct(), ‘image’, $_image->getFile()); ?>” alt=”no image” id=”productImg<?php echo $this->htmlEscape($_image->getLabel()) ?>” />

There is also the div element wrapping all that, you’ll see it in the screencast.

Hope you find this useful. Feel free to provide some feedback (comments)

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

Magento, WordPress, jQuery , , , , ,

Event calendar plugin for WordPress, broken link bug fix

August 30th, 2008

After an upgrade of one of the WordPress sites to a most recent version (2.6.1 as of time of this writing) clients Event calendar plugin stopped working properly. At firs look it showed no obvious errors, but when you tried to click a link inside the calendar the link pointed to sites home page instead of the actual event it’s intended for.

If you’re wondering what plugin I’m talking about, it’s the one you can find at http://wpcal.firetree.net, or http://sourceforge.net/projects/wpcal. The biggest problem is, that the author of this plugin seems to stop developing it since the last update time SourceForge shows us is Oct 22 2007. Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

PHP, WordPress

PHP, mass actions and the missing value of a checkbox

August 27th, 2008
Comments Off

Recently I was developing some advanced functionality for WordPress plugin that included mass delete and update by setting on few checkboxes and hitting some Delete or Update button. Retrieving values from post in PHP and executing actions based on the existence of that value is easy, all you need to do is something like

1
2
3
4
5
6
/*
This will tell you if the button of a type submit with the name “someNameValue” assigned to it has been clicked
*/
if(isset($_POST['someNameValue'])) {
	# DO SOME ACTION
}

Where “someNameValue” can come from let’s say:

1
<input id="someIdValue" class="someClassValu" type="submit" name="someNameValue" />

All you need to do is to set your form method to POST and direct action to corresponding PHP file.

Let’s suppose we want to see if some checkbox was checked. We would have something like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
	<title>Single checkbox sample</title>
</head>
 <body>
<?php
 
	if($_POST['submitUpdate']) {
		$o = '<p>You clicked the SUBMIT button</p>';
		echo($o);
	}
 
	if($_POST['someCheckBoxName']) {
 
		print_r($_POST['massUpdate']);
	}
 
?>
 
<form name="sampleForm" action="" method="POST">
<input type="checkbox" name="someCheckBoxName" value="someValueGoesHere" />
<br /><br />
<input type="submit" value="Submit checkboxes" name="submitUpdate" />
</form>
 
</body>
</html>

Ok, this was a simple example. Most of our day to day tasks, especially the ones in programming advanced features are not going to be simple as that. Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

PHP, WordPress ,