auonhaidar
Forum Replies Created
-
Thanks. Your help will be really appreciated.
Link to website: http://www.smurfers.com/shop/captain-rogers/
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteThanks a lot!
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteYes. I totally agree. That’s why it took too much time. I have to go in each and every relevant folders to find my cart class. Thanks for guidance. I think php is worth learning. I know basic php (designing and mysql stuff) but I don’t know these ‘action’ and ‘hook’ things. Can you suggest some site where I can learn it properly?
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteOkay done. I got it right.
I just toggled class of ‘Empty Cart’ anchor to ‘View Cart’ using your jquery and few jquery commands.
Thanks a lot for your support.Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteMy class of cart text is “cart_control” when cart is not empty and “cart_control_empty” when cart is empty.
Here are the lines of my cart function YIT_Widget_cart.php:if($yit_is_header) :
if ( sizeof( $woocommerce->cart->get_cart() ) > 0 ) : ?>
cart->get_cart_url(); ?>” class=”cart_control”><?php _e(‘View Cart’, ‘yit’) ?>
<?php else: ?>
cart->get_cart_url(); ?>” class=”cart_control” style=”display: none;”><?php _e(‘View Cart’, ‘yit’) ?>
<?php echo apply_filters( ‘yit_widget_header_empty_cart’, __(‘Empty Cart’, ‘yit’) ) ?>
<?php endif ?>
<div class=”cart_wrapper”>
<?php endif;Now what function should I add?
Thanks.
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteHi Rishi,
Please tell me how to change ‘EMPTY CART’ text to ‘VIEW CART’ in cart widget at top of my page : http://www.smurfers.com/shop/lannister/When you click on ‘ADD TO CART’ button after selecting variation and quantity, AJAX works and cart widget at top-left gets updated. BUT ‘EMPTY CART’ text does not get changed to ‘VIEW CART’.
Previously. when I was not using your plugin, the whole page was getting reloaded when I press ‘add to cart’ and then ‘EMPTY CART’ text changes to ‘VIEW CART’.
With your AJAX, perhaps this text change is not happening.
FYI This text layout is in my /theme/widgets/YIT_Widget_cart.phpPlease help. Atleast tell me where to look.
Thanks for your kind help till now.
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteThere is still one thing. On this page http://www.smurfers.com/shop/lannister/ when you select product,quantity and size and press add to cart, it updates cart. There are two problems-
1) At top left- cart still says -‘Empty Cart’. How to change this?
2) When I hover on it, it says product, its quantity and total price but NOT its variation (size). Can you tell me why is this happening?Thanks in advance.
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteI got it right finally!
Used this thread of yours – https://wordpress.org/support/topic/running-a-plugin-to-show-products?replies=5Thanks a lot!
Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteHey Rishi
I think I got it.This is my sidebar-shop.php file in my theme folder.
<?php
/**
* Your Inspiration Themes
*
* @package WordPress
* @subpackage Your Inspiration Themes
* @author Your Inspiration Themes Team <info@yithemes.com>
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.txt
*/wp_reset_query();
do_action( ‘yit_before_sidebar_’ . sanitize_title( yit_get_choosen_sidebar() ) ) ?>
<!– START SIDEBAR –>
<div id=”sidebar-<?php echo sanitize_title( yit_get_choosen_sidebar() ) ?>” class=”span3 sidebar group”>
<?php
// product detail page box meta
if ( yit_product_form_position_is(‘in-sidebar’) ) yit_product_single_boxmeta();if( yit_get_sidebar_layout() != ‘sidebar-no’ && ( !function_exists( ‘dynamic_sidebar’ ) || !dynamic_sidebar( yit_get_choosen_sidebar() ) ) )
{ do_action( ‘yit_default_sidebar’ ); }
?>
</div>
<!– END SIDEBAR –>
<?php do_action( ‘yit_after_sidebar_’ . sanitize_title( yit_get_choosen_sidebar() ) ) ?>I changed its class from ‘span3 sidebar group’ to ‘product-type-variable’ and it worked. But my div got all messed up.
Why is that?Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteI can send content-single-product.php file for now. See if you can point me in the right direction. The code follows:
<?php
/**
* The template for displaying product content in the single-product.php template
*
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/if ( ! defined( ‘ABSPATH’ ) ) exit; // Exit if accessed directly
wp_enqueue_script( ‘jquery-selectbox’ );
// grouped fix
global $product;
if ( $product->product_type == ‘grouped’ && yit_get_option(‘shop-detail-show-price’) ) {
remove_action( ‘yit_product_box’, ‘woocommerce_template_single_add_to_cart’, 20 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
}
?><?php
/**
* woocommerce_before_single_product hook
*
* @hooked woocommerce_show_messages – 10
*/
do_action( ‘woocommerce_before_single_product’ );if ( post_password_required() ) {
echo get_the_password_form();
return;
}?>
<div class=”row”><?php
/**
* woocommerce_show_product_images hook
*
* @hooked woocommerce_show_product_sale_flash – 10
* @hooked woocommerce_show_product_images – 20
*/
do_action( ‘woocommerce_before_single_product_summary’ );
?><div class=”summary entry-summary”>
<?php
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title – 5
* @hooked woocommerce_template_single_rating – 10
* @hooked woocommerce_template_single_price – 10
* @hooked woocommerce_template_single_excerpt – 20
* @hooked woocommerce_template_single_add_to_cart – 30
* @hooked woocommerce_template_single_meta – 40
* @hooked woocommerce_template_single_sharing – 50
*/
do_action( ‘woocommerce_single_product_summary’ );
?><?php if( yit_product_form_position_is(‘in-content’) ) yit_product_single_boxmeta() ?>
</div><!– .summary –>
<?php
/**
* woocommerce_after_single_product_summary hook
*
* @hooked woocommerce_output_product_data_tabs – 10
* @hooked woocommerce_output_related_products – 20
*/
do_action( ‘woocommerce_after_single_product_summary’ );
?></div>
<?php do_action( ‘woocommerce_after_single_product’ ); ?>Forum: Plugins
In reply to: [Woocommerce Ajax add to cart for variable products] Not Working on my siteHi Rishi
Thanks for your quick reply.
Sorry I have not understood what you just said.
I am developing this website using a purchased theme and making most of the changes through WordPress.
Can you please tell me where to do this what you just said.
Thanks.