Totally Zenned
- Join Date:
- Mar 2008
- Posts:
- 825
- Plugin Contributions:
- 0
Template Fluorspar
Thank you
Totally Zenned
Totally Zenned
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
New Zenner
( function( $ ) {
"use strict";
var $pswp = $('.pswp')[0];
var image = [];
$('.product-images-wrap').each( function() {
var $pic = $(this),
getItems = function() {
var items = [];
$pic.find('a').each(function() {
var $href = $(this).attr('href'),
$size = $(this).data('size').split('x'),
$width = $size[0],
$height = $size[1];
var item = {
src : $href,
w: 0,
h: 0
}
items.push(item);
});
return items;
}
var items = getItems();
$.each(items, function(index, value) {
image[index] = new Image();
image[index].src = value['src'];
});
$pic.on('click', 'figure', function(event) {
event.preventDefault();
var $index = $(this).find('a').data('index');
var options = {
index: $index,
bgOpacity: 0.7,
showHideOpacity: true,
captionEl : false,
fullscreenEl : true,
shareEl : false,
tapToClose : true,
tapToToggleControls : false,
closeOnScroll: false,
history:false,
closeOnVerticalDrag:false,
zoomEl: true,
counterEl: true,
arrowEl: true,
shareButtons: [
{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'},
],
}
var lightBox = new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options);
lightBox.listen('gettingData', function(index, item) {
if (item.w < 1 || item.h < 1) { // unknown size
var img = new Image();
img.onload = function() { // will get size after load
item.w = this.width; // set image width
item.h = this.height; // set image height
lightBox.invalidateCurrItems(); // reinit Items
lightBox.updateSize(true); // reinit Items
}
img.src = item.src; // let's download image
}
});
lightBox.init();
});
});
$('.tabs-nav li a').click(function(ev){
ev.preventDefault();
var tab_id = $(this).attr('href');
$('.tabs-nav li a').removeClass('active');
$('.tab-content').removeClass('active');
$(this).addClass('active');
$(tab_id).addClass('active');
});
} )( jQuery );New Zenner
New Zenner
New Zenner
Totally Zenned
New Zenner
New Zenner
dbltoe:
I am assuming but, I take it your store status is set to 1? (My Store)
And, Categories - Always Show on Main Page to 0? (Layout Settings)
New Zenner
Totally Zenned
Template Fluorspar was designed to display buy now buttons on main page and currently there is now way to change this in admin.Perhaps it might be best to re-insert into the template code the controls provided by the database and the Admin menu choices. The whole idea of database driven is that, in setting a flag that the store is showcase only, there would never be an Add to Cart button. Apparently that is removed and the control moved to the stylesheet.
<!--bof Add to Cart Box --><?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = '<div class="max-qty">' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '</div><span class="qty-text">' . PRODUCTS_ORDER_QTY_TEXT . '</span><input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->New Zenner
dbltoe:
Perhaps it might be best to re-insert into the template code the controls provided by the database and the Admin menu choices. The whole idea of database driven is that, in setting a flag that the store is showcase only, there would never be an Add to Cart button. Apparently that is removed and the control moved to the stylesheet.
Destination thread ID and reason are required when shown.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.