<?php
class OUWooOffCanvasCart extends UltimateWooEl {
public $has_js = true;
public $css_added = false;
public $msg = '';
function name() {
return __( "Off Canvas Cart", "oxyultimate-woo" );
}
function slug() {
return "ou_offcanvascart";
}
function ouwoo_button_place() {
return "main";
}
function init() {
$this->El->useAJAXControls();
$this->enableNesting();
add_filter( 'woocommerce_add_to_cart_fragments', array( $this, 'ouwoo_woo_cart_fragment' ) );
add_action( 'woocommerce_before_mini_cart_contents', 'ouwoo_common_filter_mini_cart_contents' );
add_action( 'woocommerce_before_mini_cart_contents', 'ouwoo_filter_mini_cart_contents' );
add_action('woocommerce_widget_shopping_cart_buttons', array($this, 'return_to_shop_button'), 99 );
add_filter("oxygen_vsb_element_presets_defaults", array( $this, "ouwoo_offcanvascart_presets_defaults" ) );
}
function ouwoo_offcanvascart_presets_defaults( $all_elements_defaults ) {
require("offcanvascart-presets.php");
$all_elements_defaults = array_merge($all_elements_defaults, $offcanvascart_presets);
return $all_elements_defaults;
}
function render( $options, $defaults, $content ) {
global $oxygen_svg_icons_to_load;
$total = is_object( WC()->cart ) ? WC()->cart->get_cart_contents_count() : 0;
if( isset($options['ouocc_btnvisibility']) && $options['ouocc_btnvisibility'] !== 'always'
&& ! $this->isBuilderEditorActive() ) {
$dataAttr = ' data-ouocc-appearance="' . $options['ouocc_btnvisibility'] . '"';
} else {
$dataAttr = '';
}
$trigger = isset( $options['ouocc_trigger'] ) ? $options['ouocc_trigger'] : 'hover';
$dataAttr .= ' data-ouocc-trigger="' . $trigger . '"';
if( isset( $options['ouocc_ajax_single'] ) && $options['ouocc_ajax_single'] == 'yes' && ! $this->isBuilderEditorActive() ) {
$dataAttr .= ' data-ajaxonsinglebtn="yes"';
}
if( ! is_cart() ) {
$dataAttr .= ' data-coupon-nonce="' . wp_create_nonce('apply-coupon') . '" data-remove-coupon-nonce="' . wp_create_nonce( 'remove-coupon' ) .'"';
}
$dataAttr .= ' data-checkoutpage="' . ( is_checkout() ? 'yes' : 'no' ) . '"';
if( isset( $options['ouocc_flytocart'] ) && $options['ouocc_flytocart'] == 'yes' ) {
$dataAttr .= ' data-flytocart="yes" data-offsettop="' . $options['ftc_offset_top'] . '" data-offsetleft="'. $options['ftc_offset_left'] .'"';
}
$dataAttr .= ' data-maxqtymsg="' . ( isset($options['max_qty_msg']) ? esc_html( $options['max_qty_msg'] ) : __('No more products on stock')) . '"';
$dataAttr .= ' data-minqtymsg="' . ( isset($options['min_qty_msg']) ? esc_html( $options['min_qty_msg'] ) : __('You entered wrong value.')) . '"';
$dataAttr .= ' data-shopbtntxt="' . ( isset($options['shop_button_text']) ? wp_kses_post( $options['shop_button_text'] ) : esc_html('Continue Shopping', 'woocommerce') ) .'"';
$returnshop = isset($options['shop_button_url_source']) ? esc_html( $options['shop_button_url_source'] ) : 'shop';
if( $returnshop == 'custom' && isset( $options['custom_url'] ) ) {
$shop_button_url = $options['custom_url'];
$dataAttr .= ' data-shopbtnurl="' . esc_url( $shop_button_url ) .'"';
} elseif( $returnshop != 'close' ) {
$shop_button_url = ( wc_get_page_id( 'shop' ) > 0 ) ? wc_get_page_permalink( 'shop' ) : '#';
$dataAttr .= ' data-shopbtnurl="' . esc_url( $shop_button_url ) .'"';
} else {
$dataAttr .= ' data-shopbtnurl="' . $returnshop .'"';
}
echo '<div class="ou-cart-button ouocc-type-' . $options['ouocc_tnumpos'] .'"'. $dataAttr .'>';
if ( $options['ouocc_tnumpos'] == 'before' ) {
printf('<span class="cart-items-num cart-items-count-before"><span class="cart-counter">%d</span></span>', absint( $total ) );
}
$aria_label = isset( $options['ouocc_aria_label'] ) ? $options['ouocc_aria_label'] : __( 'View your shopping cart', "oxyultimate-woo" );
echo '<a class="ouocc-cart-btn oumc-cart-btn ouocc-type-' . $options['ouocc_btnt'] .'" href="JavaScript: void(0);" title="'. esc_html( $aria_label ) .'" aria-label="'. esc_html( $aria_label ) .'">';
if( isset( $options['ouocc_cprice'] ) && $options['ouocc_cprice'] == 'yes' && isset( $options['ouocc_ppos'] ) && $options['ouocc_ppos'] == 'left' )
{
printf('<span class="price-align-left top-price"><span class="cart-price">%d</span></span>', wc_price( $this->ou_cart_total() ) );
}
if( $options['ouocc_btnt'] == 'icon' ) {
if( $options['ouocc_ict'] == 'icon' ) {
$oxygen_svg_icons_to_load[] = $options['ouocc_btnicon'];
echo '<svg id="' . $options['selector'] . '-cart-icon" class="oumcart-icon"><use xlink:href="#' . $options['ouocc_btnicon'] . '"></use></svg>';
}
if( $options['ouocc_ict'] == 'image' && isset($options['ouocc_btnimg']) ) {
$alt = isset($options['ouocc_btnimgalt']) ? $options['ouocc_btnimgalt'] : '';
$width = (isset($options['ouocc_btnimgw'])) ? ' width="' . $options['ouocc_btnimgw'] . '"' : '';
$height = (isset($options['ouocc_btnimgh'])) ? ' height="' . $options['ouocc_btnimgh'] .'"' : '';
echo '<img src="' . $options['ouocc_btnimg'] .'"'. $width . $height .' class="oumcart-btn-image" alt="'. wp_kses_post( $alt ) . '" />';
}
} elseif( $options['ouocc_btnt'] == 'bothit') {
if( $options['ouocc_ict'] == 'icon' ) {
$oxygen_svg_icons_to_load[] = $options['ouocc_btnicon'];
echo '<svg id="' . $options['selector'] . '-cart-icon" class="oumcart-icon"><use xlink:href="#' . $options['ouocc_btnicon'] . '"></use></svg>';
}
if( $options['ouocc_ict'] == 'image' && isset($options['ouocc_btnimg']) ) {
$alt = isset($options['ouocc_btnimgalt']) ? $options['ouocc_btnimgalt'] : '';
$width = (isset($options['ouocc_btnimgw'])) ? ' width="' . $options['ouocc_btnimgw'] . '"' : '';
$height = (isset($options['ouocc_btnimgh'])) ? ' height="' . $options['ouocc_btnimgh'] .'"' : '';
echo '<img src="' . $options['ouocc_btnimg'] .'"'. $width . $height .' class="oumcart-btn-image" alt="'. wp_kses_post( $alt ) . '" />';
}
if( isset( $options['ouocc_text'] ) ) {
echo '<span class="cart-btn-text">' . $options['ouocc_text'] . '</span>';
}
} else {
echo '<span class="cart-btn-text">' . $options['ouocc_text'] . '</span>';
}
if( isset( $options['ouocc_cprice'] ) && $options['ouocc_cprice'] == 'yes' && isset( $options['ouocc_ppos'] ) && $options['ouocc_ppos'] == 'right' )
{
printf('<span class="price-align-right top-price"><span class="cart-price price-align-right">%d</span></span>', wc_price( $this->ou_cart_total() ) );
}
if ( $options['ouocc_tnumpos'] == 'bubble' ) {
printf('<span class="cart-items-num"><span class="cart-counter">%d</span></span>', absint( $total ) );
}
echo '</a>';
if ( $options['ouocc_tnumpos'] == 'after' ) {
printf('<span class="cart-items-num cart-items-count-after"><span class="cart-counter">%d</span></span>', absint( $total ) );
}
echo '</div>';
$class = '';
if( $this->isBuilderEditorActive() ) { $class = ' ouocc-builder-edit'; }
echo '<div class="ouocc-overlay' . $class . '"></div>';
echo '<div class="ouocc-panel-container align-' . strtolower($options['ocpanel_align']) . $class . '" data-reveal="'. $options['reveal_panel'] . '"';
if( isset( $options['reveal_panel'] ) && $options['reveal_panel'] == "yes" ) {
echo ' data-reveal-delayin="'. ( isset( $options['reveal_delayin'] ) ? absint( $options['reveal_delayin'] ) : 1500 ) . '"';
echo ' data-reveal-delayout="' . (isset( $options['reveal_delayout'] ) ? absint( $options['reveal_delayout'] ) : 4500 ) . '"';
echo ' data-reveal-autoclose="' . (isset( $options['auto_close'] ) ? $options['auto_close'] : 'yes' ) . '"';
}
echo '>';
if( isset( $options['panel_title']) || isset($options['close_icon']) ) {
echo '<div class
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件1.4.4.zip
共95个文件
php:62个
js:13个
css:10个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 35 浏览量
2022-04-05
05:44:01
上传
评论
收藏 362KB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件1.4.4 Oxy Ultimate Woo oxy ultimate呜" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源推荐
资源详情
资源评论
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件1.4.4.zip (95个子文件)
oxyultimate-woo
elements
free-shipping-notice
free-shipping-notice.php 34KB
myaccount-form-login
myaccount-form-login.php 30KB
review-graph
review-graph.php 11KB
checkout-coupon-form
checkout-coupon-form.php 9KB
index.php 27B
product-images
photoswipe-markup.php 2KB
product-images.css 6KB
product-images.php 35KB
checkout-page
checkout-page.php 4KB
review-form
review-form.php 19KB
cart-totals
cart-totals.php 38KB
cart-totals-presets.php 1KB
review-ratings
review-ratings.php 14KB
add-to-cart
add-to-cart.php 41KB
cross-sells
cross-sells-presets.php 224B
cross-sells.php 13KB
myaccount-form-registration
myaccount-form-registration.php 15KB
sales-offer
sales-offer.php 4KB
.DS_Store 8KB
myaccount-lost-password
myaccount-lost-password.php 13KB
recently-viewed
recently-viewed.php 43KB
billing-form
billing-form.php 2KB
thankyou-order-details
thankyou-order-details.php 4KB
cart-page
cart-page.php 8KB
checkout-login-form
checkout-login-form.php 18KB
quick-view
quick-view.php 19KB
quick-view.css 4KB
shipping-form
shipping-form.php 2KB
cart-items
cart-items-view.php 6KB
cart-items-presets.php 4KB
cart-items.php 35KB
categories
categories.css 7KB
categories.php 42KB
thankyou-order-items-builder
item-title.php 2KB
thankyou-order-items-builder.php 4KB
item-sku.php 2KB
item-meta.php 4KB
item-image.php 4KB
quantity.php 2KB
item-price.php 2KB
menucart
menucart-presets.php 12KB
menucart.php 46KB
menucart.css 4KB
checkout-payment
checkout-payment.php 27KB
minicart
minicart-presets.php 6KB
minicart.php 38KB
minicart.css 6KB
customer-details
customer-details.php 3KB
checkout-form-builder
chevron-down-white.svg 199B
checkout-form-builder.php 18KB
offcanvascart
offcanvascart-presets.php 15KB
offcanvascart.php 73KB
offcanvascart.css 9KB
checkout-review-order
checkout-review-order.php 12KB
product-tabs-in-accordion
product-tabs-in-accordion.css 4KB
preset.php 4KB
product-tabs-in-accordion.php 26KB
templates
cart
mini-cart.php 4KB
content-product.php 1KB
.DS_Store 6KB
thank-you.php 2KB
content-product_cat.php 1KB
item-template.php 640B
assets
css
swiper.min.css 13KB
ouwoo-admin.css 4KB
ouwoo-ct-builder.css 140B
images
no.png 755B
yes.png 539B
wpsnipper.gif 9KB
js
ouwoo-ct-builder.js 2KB
easyzoom.min.js 4KB
oumenucart.js 5KB
swiper.min.js 138KB
ou-off-canvas-cart.js 12KB
ouwoo-fsn.js 3KB
product-images-slider.js 5KB
ouwoo-swiper-carousel.js 2KB
photoswipe-init.min.js 2KB
activate-plugin.js 2KB
prdcat-carousel.js 2KB
tabtoacrd.js 3KB
ouwoo-quick-view.js 3KB
.DS_Store 8KB
.DS_Store 6KB
languages
oxyultimate-woo.po 170KB
oxyultimate-woo.mo 434B
oxyultimate-woo.php 883B
includes
updater.php 13KB
class-ouwoo-loader.php 4KB
helpers.php 15KB
UltimateWooEl.php 9KB
admin.php 24KB
conditions.php 21KB
components-init.php 6KB
smart-php-func
ou-woo.php 9KB
共 95 条
- 1
资源评论
Lee达森
- 粉丝: 969
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功