'id' => 'slideshow',
'description' => __('Meta Slider/Slideshow Area')
));
-
+
}
}
);
$tabs['description']['title'] = __('Details');
unset( $tabs[ 'reviews' ]);
-
+
unset( $tabs[ 'additional_information' ]);
-//
+//
$tabs[ 'photos_tab' ][ 'priority' ] = 5;
$tabs[ 'description' ][ 'priority' ] = 10;
$tabs[ 'itinerary_tab' ][ 'priority' ] = 20;
$tabs[ 'product_inquiry_tab' ][ 'priority' ] = 40;
return $tabs;
-
+
}
function woo_product_inquiry_content() {
function woo_photos_content() {
global $product;
-
+
$attachment_ids = $product->get_gallery_attachment_ids();
echo "<ul class='product_gallery_images'>";
- foreach( $attachment_ids as $attachment_id )
- {
+ foreach( $attachment_ids as $attachment_id )
+ {
$full_url = wp_get_attachment_image_src( $attachment_id, 'full' )[0];
-
+
echo '<li class="products_image_container">
<a class="product_image_link" rel="gallery1" href="' . $full_url .'" style="background: url('.$full_url.')no-repeat center center;background-size: cover;">
-
+
</a>
- </li>';
+ </li>';
}
echo "</ul>";
}
add_filter( 'gform_field_value_product_name', 'gform_add_product_name_field' );
function gform_add_product_name_field( $value ) {
-
+
global $product, $post, $woocommerce;
-
+
if ( ! empty($_GET) && isset($_GET)){
$title = $_GET['title'];
} else {
add_filter( 'gform_field_value_product_sku', 'gform_add_product_sku_field' );
function gform_add_product_sku_field( $value ) {
global $product, $post, $woocommerce;
-
+
if ( ! empty($_GET) && isset($_GET)){
$sku = $_GET['sku'];
} else {
add_action('woocommerce_after_shop_loop_item_title','woocommerce_template_single_excerpt', 5);
function shareThis(){
- echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';
+ echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';
}
add_action( 'woocommerce_single_product_summary', 'shareThis', 20);
'glm_foundation',
get_template_directory_uri() . '/js/app.js',
'jquery',
- '1.0',
+ '1.1',
true
);
wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
}
echo '<div class="header-image-background"';
if ( has_post_thumbnail($post_id) && is_post_type('page')) {
-
+
$image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), "full");
echo ' style="background-image: url('.$image_data[0].');padding:0 0 25%;background-position: center center;background-repeat:no-repeat;max-height: 300px;background-size: cover;margin: 0 auto; "';
-
+
} else {
echo ' style="background-image: url('.get_template_directory_uri().'/assets/DI-00889-132-1-3600x1800.jpg);padding:0 0 25%;background-position: center center;background-repeat:no-repeat;max-height: 300px;background-size: cover;margin: 0 auto; "';
echo ' class="no-featured"';
function set_post_content( $entry, $form ) {
// echo '<pre>', print_r($entry), '</pre>';
if($form['id'] === 4){
-
+
if ( $entry['36.3'] > 1){
$qty = $entry['36.3'] - 1;
$qty = ($qty * 2) + 3;
$entry['38.2'] = '$' . $qty;
$entry['38.2'] = 2;
}
-
+
}
if ( $form['gfpdf_form_settings'] ){
'input_16_2'=>'input_16_3'
);
foreach($fields as $key=>$value){
-
+
$prod_quantity = $_POST[$value];
-
+
if( $prod_quantity ){
$populated_fields[$key] = array('price'=>$_POST[$key], 'qty'=>$_POST[$value]);
- }
+ }
}
// loop through the populated fields to calc the qty
$quantity = 0;
// foreach($populated_fields as $price=>$info){
// $quantity += $info['qty'];
// }
-//
+//
// // logic to determine the discount rate, every 4 gets $10 off
// if($quantity % 4 === 0){
// $discount_qty = $quantity / 4;
// $discount_qty = floor($quantity / 4);
// $discount_price = $discount_qty * 10;
// $price_total = ($quantity * 10) - $discount_price;
-//
+//
// } else if( $quantity < 4){
// $price_total = $quantity * 10;
// }
-//
+//
// $new_price = $price_total / $quantity;
-//
+//
// // set the newly calulated price for pdf form
// foreach($populated_fields as $price=>$info){
// $_POST[$price] = $new_price;
// }
-
+
}
add_action( 'gfpdf_post_html_fields', function( $entry, $config ) {
if($entry['form_id'] === '2'){
echo "<div class='gf_right_half' style='font-weight: bold;width: 200px;margin-right: 74px;color: black;'> DISCOUNTED TOTAL: " . $entry['20'] . "</div>";
}
-
-
+
+
}, 10, 2 );
-?>
\ No newline at end of file
+?>
}
});
setInterval(function(){
- $('#cam1').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image2_large.jpg?b=' + Math.random());
- $('#cam2').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image1_medium.jpg?b=' + Math.random());
- $('#cam3').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image3_medium.jpg?b=' + Math.random());
- $('#cam4').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image4_medium.jpg?b=' + Math.random());
+ var d = new Date();
+ $('#cam1').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image2_large.jpg?b=' + d.getTime());
+ $('#cam2').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image1_medium.jpg?b=' + d.getTime());
+ $('#cam3').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image3_medium.jpg?b=' + d.getTime());
+ $('#cam4').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image4_medium.jpg?b=' + d.getTime());
}, 60000);
var pdf_form = page.find( $(".pdf-form") );
}
});
setInterval(function(){
- $('#cam1').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image2_large.jpg?b=' + Math.random());
- $('#cam2').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image1_medium.jpg?b=' + Math.random());
- $('#cam3').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image3_medium.jpg?b=' + Math.random());
- $('#cam4').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image4_medium.jpg?b=' + Math.random());
+ var d = new Date();
+ $('#cam1').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image2_large.jpg?b=' + d.getTime());
+ $('#cam2').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image1_medium.jpg?b=' + d.getTime());
+ $('#cam3').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image3_medium.jpg?b=' + d.getTime());
+ $('#cam4').attr('src','http://cams.gaslightmedia.com/cameras/images/MacBridge_image4_medium.jpg?b=' + d.getTime());
}, 60000);
var pdf_form = page.find( $(".pdf-form") );