Skip to content

Instantly share code, notes, and snippets.

View cristianstan's full-sized avatar
🎯
Focusing

Cristian Stan cristianstan

🎯
Focusing
View GitHub Profile
@cristianstan
cristianstan / Magento: Import Bulk Categories
Created March 3, 2014 11:29
Magento: Import Bulk Categories
There is a requirement of my client to import bulk category, So to solve this we created this export import extension.
To install this download extension from link below unzip files paste both app and skin folder to your magento folder its will ask for over writing click ok, clear your var/cache folder login to your admin panel on top you will see MageWorks category import/export options
=========EXTENSION=============
SOURCE: http://www.magentoworks.net/importexport-magento-category-extension
@cristianstan
cristianstan / CSS: Responsive intervals v2.css
Created March 13, 2014 14:19
CSS: Responsive intervals v2
/* ### Responsive Max_319px ### */
@media only screen and (max-width: 319px) {
@cristianstan
cristianstan / Simple Ajax Login Form.php
Last active February 22, 2025 16:16
Wordpress: Simple Ajax Login Form
<?php
//Simple Ajax Login Form
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/
?>
//html
<form id="login" action="login" method="post">
<h1>Site Login</h1>
<p class="status"></p>
<label for="username">Username</label>
@cristianstan
cristianstan / Wordpress: Show post date time ago days ago.php
Created April 10, 2014 14:08
Wordpress: Show post date time ago/ days ago
<?php
// add this within functions.php
function comments_time_ago( $type = 'comment' ) {
$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago');
}
//to show comment time
@cristianstan
cristianstan / Wordpress: Get author meta.php
Created April 12, 2014 09:58
Wordpress: Get author meta
<?php
//GET AUTHOR ID
$authorID = get_the_author_meta('ID');
// GET "fax" meta
echo get_the_author_meta('fax', $authorID, true); ?>
or
the_author_meta('fax');
>
@cristianstan
cristianstan / Wordpress: Frontend user edit profile
Created May 15, 2014 13:18
Wordpress: Frontend user edit profile
SOURCE: http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end
@cristianstan
cristianstan / Magento: Get number of items in cart.php
Created May 16, 2014 22:21
Magento: Get number of items in cart
<?php
//Get number of items in cart
$totalItemsInCart = Mage::helper('checkout/cart')->getItemsCount();
?>
@cristianstan
cristianstan / Magento: If customer is logged in.php
Created May 16, 2014 22:23
Magento: If customer is logged in
<?php
$this->helper('customer')->isLoggedIn()
?>
@cristianstan
cristianstan / Magento: GoDaddy No input file specified
Created May 17, 2014 23:33
Magento: GoDaddy "No input file specified"
//Magento: GoDaddy "No input file specified" (MAY 2014)
add to your .htaccess
Options +ExecCGI
AddHandler x-httpd-php5-cgi .php
AddHandler x-httpd-php5-cgi .php5
Options -MultiViews
RewriteRule ^index.php/(.*) /$1 [L]
@cristianstan
cristianstan / jQuery: Sidebar height equal with content resolution smaller than.js
Created May 19, 2014 12:42
jQuery: Sidebar height equal with content resolution smaller than
<script type='text/javascript'>
if (jQuery(window).width() > 960) {
jQuery('.col-md-3.col-md-pull-9.left_side').height(jQuery('.main-content#main-content').height());
}
if (jQuery(window).width() > 960) {
jQuery('.col-md-3.col-md-pull-9.left_side').height(jQuery('.narrowcolumn').height());
jQuery('.col-md-3.col-md-pull-9.left_side').height(jQuery('.right_side').height());
}
</script>