Zen Cart Override Structure

Zencart has a great override system. I’m currently setting up a Zen Cart website and loving this override system. The only improvement I see that is REALLY NEEDED is an ADMIN OVERRIDE. That would be terrific. Until then here’s a schematic of the current Zen Cart override system.
Zen Cart Override Diagram

Related Posts

WordPress custom Functions.php I need. Thanks digwp.com

Completely remove the version number from pages and feeds

A commonly cited security measure for WordPress-powered sites involves removing the automatically generated version number from appearing in the section of your pages’ source code. This type of security technique is referred to as “security through obscurity,” and aims at hiding potentially sensitive information from a would-be attacker. Here’s a function that does the job:

// remove version info from head and feeds
function complete_version_removal() {
return ”;
}
add_filter(‘the_generator’, ‘complete_version_removal’);
This will remove your site’s version and generator information from all of your pages and feeds, making it a little bit harder for the bad guys and a little bit safer for you and your visitors.

Delay feed update after posting

As a chronic perfectionist, I hate it when I post something only to discover an error a few minutes later. By the time I notice, fix and update the post, it’s already been beamed out all over the freakin’ place. To prevent this, I like to take the advice of WPEngineer and give myself a little buffer period or “safety net” after publishing my posts.

// delay feed update
function publish_later_on_feed($where) {
global $wpdb;

if (is_feed()) {
// timestamp in WP-format
$now = gmdate(‘Y-m-d H:i:s’);

// value for wait; + device
$wait = ‘5’; // integer

// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
$device = ‘MINUTE’; // MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

// add SQL-sytax to default $where
$where .= ” AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, ‘$now’) > $wait “;
}
return $where;
}
add_filter(‘posts_where’, ‘publish_later_on_feed’);
This code quietly and automatically gives me an extra five minutes before my post is added to my feeds. If you need more or less than five minutes, just edit the “$wait” variable with the integer of your choice.

Add an Admin link to the WordPress “All-Settings” page

As we’ve explained before, WordPress makes it easy to view and edit your blog settings from the Admin area. Thanks to a file named “options.php”, WordPress will display all of your database settings and enable you to edit a majority of them. To view this page, you need to log in as Admin and enter this URL in your browser’s address bar:

http://domain.tld/wp-admin/options.php

Having access to your “All-Settings” page can be extremely helpful, so it’s nice to display a direct link for easy access. The following slice of code in your functions.php file is all that’s needed:

// admin link for all settings
function all_settings_link() {
add_options_page(__(‘All Settings’), __(‘All Settings’), ‘administrator’, ‘options.php’);
}
add_action(‘admin_menu’, ‘all_settings_link’);
Once in place, you will see a link to your “All Settings” page in the WordPress Admin. You can change the name of the link to whatever you prefer by editing the two instances of “All Settings”.

Thanks for the great code DigWP.com
http://digwp.com/2010/04/wordpress-custom-functions-php-template-part-2/

Related Posts

ZenCart update from 1.3.8 to 1.3.9a FAILURE

Anybody else update from 1.3.8 to 1.3.9 and you cannot log into the admin anymore. Just an infinite loop of typing your password over and over again to end up back at the login screen with the username and password boxes cleared. When you type the password incorrect, it lets you know, but when it’s correct you’re stuck in an infinite loop of trying to log in over and over again.

Here’s what we do to fix this problem.

Stop using chrome because it’s horrible caching system messes me up developing 100% of the time! THANKS GOOGLE!

Related Posts