Skip to content

Instantly share code, notes, and snippets.

View agusmu's full-sized avatar

agusmu

  • Indonesia
  • 13:49 (UTC +07:00)
View GitHub Profile
@agusmu
agusmu / style_01.css
Last active December 23, 2015 14:39
PrimaShop - Adjust Header Height With Responsive Logo
/* minimum height of your header */
/* 120 = 35 (top) + 50 (logo height) + 35 (bottom) */
#header {
min-height: 120px;
}
/* adjust top and bottom padding of the responsive logo */
#header-title a.header-logo {
padding-top: 35px;
padding-bottom: 35px;
}
<?php
/**
* Database emtpying and file removing class.
*
* Truncates all necessary tables in the defined database and removes
* any files uploaded by the demo user.
*
* @since 1.0.0
*
* @author Thomas Griffin
<?php
/*
Plugin Name: Soliloquy Demo
Plugin URI: http://soliloquywp.com/
Description: Creates demo user and manages roles so Soliloquy can have a live demo.
Author: Thomas Griffin
Author URI: http://thomasgriffinmedia.com/
Version: 1.0.0
License: GNU General Public License v2.0 or later
License URI: http://www.opensource.org/licenses/gpl-license.php
@agusmu
agusmu / functions_01.php
Created September 17, 2013 15:03
PrimaShop (WPEC) - Simple Stock Availability
<?php /* BEGIN - STOCK AVAILABILITY */ ?>
<?php if( !prima_get_setting('wpec_product_stock_hide') ): ?>
<?php if(wpsc_product_has_stock()) : ?>
<?php if(wpsc_product_remaining_stock()) : ?>
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><?php printf( __('%s remaining stock', 'primathemes'), wpsc_product_remaining_stock()); ?></div>
<?php else : ?>
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="in_stock"><?php _e('Product in stock', 'primathemes'); ?></div>
<?php endif; ?>
<?php else: ?>
<div id="stock_display_<?php echo wpsc_the_product_id(); ?>" class="out_of_stock"><?php _e('Product not in stock', 'primathemes'); ?></div>
@agusmu
agusmu / functions.php
Last active December 22, 2015 17:08
PrimaShop - Show Breadcrumb At The Bottom Of Your Single Page
/* show breadcrumb at the bottom of your single page */
add_action( 'get_header', 'prima_custom_show_breadcrumb_bottom' );
function prima_custom_show_breadcrumb_bottom() {
/* show it in the bottom of your single post*/
if ( is_singular('post') && !prima_get_setting( 'breadcrumb_hide_post' ) ) {
add_action( 'prima_content_after', 'prima_breadcrumb' );
}
/* show it in the bottom of your page */
if ( is_page() && !prima_get_setting( 'breadcrumb_hide_page' ) && !prima_get_post_meta( '_page_breadcrumb_hide' ) ) {
add_action( 'prima_content_after', 'prima_breadcrumb' );
@agusmu
agusmu / style_01.css
Last active December 22, 2015 16:59
WooCommerce - Fixing Minor Issue On Customer Login Page
/* reduce font size of customer login label on my account page */
#customer_login label {
font-size: 12px;
}
@agusmu
agusmu / style.css
Created September 9, 2013 23:18
PrimaShop - Rounder Corners on Boxed Layout Container
/* give rounded corners to boxed container */
#container .container-inner {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
/* give top rounded corners to top navigation */
@agusmu
agusmu / style_01.css
Last active December 22, 2015 11:08
PrimaShop - Header Submenu Arrow Indicator
#header-menu .menu-primary li .sf-sub-indicator {
display : inline;
}
@agusmu
agusmu / style.css
Created September 2, 2013 01:20
WooCommerce - Fancy Sale Sticker
/* fancy sale sticker */
.woocommerce ul.products li.product .onsale, .woocommerce-page ul.products li.product .onsale, .woocommerce span.onsale, .woocommerce-page span.onsale {
background: transparent url(images/sale.png) no-repeat !important;
width: 125px;
height: 125px;
text-align: left;
text-indent: -99999px;
padding: 0;
margin: 0;
position: absolute;
@agusmu
agusmu / style.css
Last active December 21, 2015 18:38
PrimaShop - Adjust header dropdown submenu positioning
/* header menu - toplevel padding: 65+20+15=100 */
#header-menu .menu-primary a, #header-menu .menu-primary a:visited {
padding-top: 65px;
line-height: 20px;
padding-bottom: 15px;
}
/* header menu - submenu positioning */
#header-menu .menu-primary li:hover ul, #header-menu .menu-primary li.sfHover ul {
top: 100px;
}