This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//welcart クーポンコード | |
add_filter('usces_order_discount', 'coupon_order_discount', 10, 2); | |
function coupon_order_discount($discount, $cart){ | |
global $usces; | |
$entry = $usces->cart->get_entry(); | |
$total_items_price = $usces->get_total_price(); | |
if($entry['custom_order']['coupon'] == 'クーポンコード'){ | |
$discount = ceil($total_items_price * 0.1 * -1); | |
} | |
return $discount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="twitter:card" content="product"> | |
<meta name="twitter:site" content="@twitter_account"> | |
<meta name="twitter:creator" content="@twitter_account"> | |
<meta name="twitter:title" content="<?php usces_the_itemName(); ?>"> | |
<meta name="twitter:description" content="<?php echo get_post_meta($post->ID ,'wccs_詳細' ,true); ?>"> | |
<meta name="twitter:image" content="<?php usces_the_itemImageURL(0); ?>"> | |
<meta name="twitter:data1" content="<?php usces_crform(usces_the_firstPrice('return'),true, false); ?>"> | |
<meta name="twitter:label1" content="Price"> | |
<meta name="twitter:data2" content="<?php echo get_post_meta($post->ID , 'wccs_サイズ' ,true); ?>"> | |
<meta name="twitter:label2" content="Size"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="twitter:card" value="summary" /> | |
<meta name="twitter:url" value="<?php echo get_permalink(); ?>" /> | |
<meta name="twitter:title" value="<?php echo get_the_title(); ?>" /> | |
<meta name="twitter:description" value="<?php echo get_the_excerpt(); ?>" /> | |
<meta name="twitter:image" value="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" /> | |
<meta name="twitter:site" value="@twitter_account" /> | |
<meta name="twitter:domain" content="your URL"/> | |
<meta name="twitter:creator" value="@twitter_account" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//総合計金額をフィルター | |
add_filter('usces_filter_set_cart_fees_total_full_price', 'my_filter_set_cart_fees_total_full_price', 10, 6); | |
function my_filter_set_cart_fees_total_full_price(){ | |
global $usces; | |
$args = func_get_args(); | |
$tax = $usces->getTax( $args[1] ); | |
$total_full_price = $args[1] + $tax + $args[2] + $args[3] + $args[4] + $args[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<!-- | |
function data_in(){ | |
//フォームデータ入力用変数 | |
var denpyou; | |
var kaisha; | |
var url; | |
url = new Array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*add before get_aggregate_reviews($pageID) */ | |
function get_average_rating() { | |
global $post; | |
$this->get_aggregate_reviews($post->ID); | |
$average_score = number_format($this->got_aggregate["aggregate"], 1); | |
return $average_score * 20; // 20% for each star if having 5 stars | |
} | |
/*do_the_content($original_content), just after $the_content = ''; add the following:*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//エラー処理 | |
$kaisha = (!isset($_POST['kaisha'])) ? null : $kaisha = $_POST['kaisha']; | |
$denpyou = (!isset($_POST['denpyou'])) ? null : $denpyou = $_POST['denpyou']; | |
$submit = (!isset($_POST['submit'])) ? null : $submit = $_POST['submit']; | |
//URL設定 | |
//クロネコヤマト | |
$url['1'] = "http://jizen.kuronekoyamato.co.jp/jizen/servlet/crjz.b.NQ0010?id=".$denpyou; | |
//佐川急便 | |
$url['2'] = "http://k2k.sagawa-exp.co.jp/p/web/okurijosearch.do?okurijoNo=".$denpyou; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="entry-text"><?php wpfp_clear_list_link(); ?></div> | |
<?php $favorite_post_ids = wpfp_get_user_meta() ?> | |
<?php if ($favorite_post_ids): | |
$favorite_post_ids = array_reverse($favorite_post_ids); | |
$post_per_page = 20; | |
$page = intval(get_query_var('paged')); | |
query_posts(array('post__in' => $favorite_post_ids, 'posts_per_page'=> $post_per_page, 'orderby' => 'post__in', 'paged' => $page)); ?> | |
<div id="fave_posts_thumbnails"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="thumb-gallery"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute() ); ?>"><?php usces_the_itemImage($number = 0, $width = 150, $height = 150 ); ?></a></a><br><div class="remove-link"><?php wpfp_remove_favorite_link(get_the_ID());?></div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
//上記を変更 | |
<div id="post"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_hentry( $classes ) { | |
$classes = array_diff($classes, array('hentry')); | |
return $classes; | |
} | |
add_filter('post_class', 'remove_hentry'); |
NewerOlder