Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   eCommerce & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=31)
-   -   [SOLVED] Atahualpa and Woocommerce 3.3.1 (http://forum.bytesforall.com/showthread.php?t=24006)

Grum Feb 9, 2018 08:24 AM

[SOLVED] Atahualpa and Woocommerce 3.3.1
 
The latest Woocommerce 3.3.1 update has been causing me some problems (now there's a surprise!).
https://westerngeomancy.org/shop/

The shop page looks OK except that the payment options banner is now not centred, and when you go into a category or an item it is displaying with sidebars when it shouldn't. (Sidebars are disabled for the shop page in ATA options.) Also, the old 2.8.6 displayed a navigation hierarchy above the products, which has now disappeared (e.g. SHOP>courses> etc.)

I have added the 'declare Woocommerce support' code as mentioned on their support forum here: https://github.com/woocommerce/wooco...port-in-themes -
I just pasted the whole settings code into ATA > CSS inserts, but I can't say that it seems to have made any difference. The whole WC inserts section (including the part inserted by Juggledad to get ATA to work with Woocommerce originally) now look like this:
PHP Code:

.woocommerce ul.products li.product a img, .woocommerce div.product div.images img {
   
widthauto;
}

function 
mytheme_add_woocommerce_support() {
    
add_theme_support'woocommerce', array(
        
'thumbnail_image_width' => 150,
        
'single_image_width'    => 300,

        
'product_grid'          => array(
            
'default_rows'    => 3,
            
'min_rows'        => 2,
            
'max_rows'        => 8,
            
'default_columns' => 4,
            
'min_columns'     => 2,
            
'max_columns'     => 5,
        ),
    ) );
}
add_action'after_setup_theme''mytheme_add_woocommerce_support' 

I'm a bit stumped as to where to go with this now. Maybe it's time to find another theme?

juggledad Feb 9, 2018 10:15 AM

I’ll try to take a look this weekend but currently I just got back from a 3 hr round trip to pick up a sick 3yr old grandson after dropping the 5yr old cousin at school and grabbing the 3yr olds baby sister (11 months) and his older brother and in a few I have to put them both in the car again to pick up the 5 yr old and take the 5 and 6 yr olds to my sons and in 3 hours pick up the 7 yr old and drive him home.

Ohhh did I mention my wife is sick with a bug and I have a sore throat. Sigh...I hope I make it thru the day

Grum Feb 10, 2018 02:41 AM

No panic JD, it's more important to look after yourself! I can send you a good hot toddy recipe for your throat if you like. :)

I recall now that there is some Woo code in the functions.php that relates to removing sidebars. Possibly that is causing issues with the new WC.

juggledad Feb 11, 2018 02:49 AM

try adding to the CSS Inserts
HTML Code:

div.post table {margin: 0 30%;}
you might need to play with the % and if you have other tables, you might want to prefic the CSS selector with 'div.post-1652' whish is the post that shows on. There may be other problems in the site because of the change so you need to go look for them.

p.s. I now have the flu....and my bodies furnace has gone haywire. There are times I've got a fever and my hands are like ice. I've taken to wearing mittens at times....Fortunately I got on tamale within 24 hours and hopefully it won't be too bad...

Grum Feb 14, 2018 07:26 AM

Quote:

Originally Posted by juggledad (Post 115187)
try adding to the CSS Inserts
HTML Code:

div.post table {margin: 0 30%;}
you might need to play with the % and if you have other tables, you might want to prefic the CSS selector with 'div.post-1652' whidh is the post that shows on

Hi JD,

Thanks for taking a look under less than optimal conditions! I hope your suffering has lessened a bit.

I haven't had a great deal of time to play around with this, but I tried adding your suggested CSS insert, with and without the '1652' and with varying percentage values, but it hasn't made any difference. I also tried removing the WC code in the functions.php file but that didn't go well at all LOL.

Another issue that I've just notices is that if you click on one of the category images, as well as having the sidebars it is showing all the comments from the entire site underneath.

I'm getting well out of my comfort zone trying to fix things here... maybe it is time to look around at other themes. When I can find the time, that is.

juggledad Feb 15, 2018 04:14 AM

Quote:

Another issue that I've just notices is that if you click on one of the category images, as well as having the sidebars it is showing all the comments from the entire site underneath.
Swap to twenty-seventeen and see if it s an issue there - could be a woocommerse bug. I'd take a look, but I don't know what you mean a category image in the shop page or somewhere else. If on the shop page, what do you mean by a category image? The item for sale images?

Grum Feb 16, 2018 08:12 AM

1 Attachment(s)
Quote:

Originally Posted by juggledad (Post 115198)
what do you mean by a category image?

The category pages are showing a listing of comments from the entire site, see for example: https://westerngeomancy.org/product-category/emf/

I tried swapping to 2017 theme, both sidebars were then present on the entire shop including the main shop page; although interestingly the left sidebar appeared underneath the main 'loop' content. See attachment for a section of the main shop page in 2017.

I'm wondering if the code that was added to the functions.php to deal with the sidebar issue when I first installed WC has anything to do with it? I tried removing this but then lost the whole site to the dreaded white screen..

Code:

add_action('wp', create_function("", "if (is_archive(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on individual product pages

add_action('wp', create_function("", "if (is_singular(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on all pages

remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
?>


juggledad Feb 16, 2018 02:52 PM

Ahhh the “products” category page! I was looking at the Wordpress category page and saw nothing wrong . I’ll take a lo.

One question, when you swapped to twenty seventeen, did the comments show up?

Grum Feb 17, 2018 03:40 AM

Quote:

Originally Posted by juggledad (Post 115200)
One question, when you swapped to twenty seventeen, did the comments show up?

Good question! I had to go and switch themes again to check, but the comments don't show up.

Something I missed when I took that screenshot earlier is that the left and right sidebars are switched around.

juggledad Feb 17, 2018 06:08 AM

Ok, I just went in and applied the two Atahualpa changes from the other thread (I've copied them in below) and I get no comments on a product category page, the right sidebar shows correctly and the footer exists where it should.

This leads me to beleive that (1) there is a conflict with the plugins you have or (2) you made an error is some editing of the atahualpa files. The only way I could determine the issue would be to get into your site and poke around and/or make a copy to play with on my local machine.

Oh, the reason the screen when blank when you removed the code at the bottom of function.php is because you must not have replaced the line they replaced. The file must end with the line:
HTML Code:

?>
or you will get a white screen.

Here are the only changes I made:
footer.php: change line 3 from
HTML Code:

if (!isset($bfa_ata))
to
HTML Code:

if ((!isset($bfa_ata)) or (class_exists('Woocommerce')) )
function.php: change the last line from
HTML Code:

?>
to
HTML Code:

add_action('wp', create_function("", "if (is_archive(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on individual product pages

add_action('wp', create_function("", "if (is_singular(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on all pages

remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
?>


Grum Feb 17, 2018 06:58 AM

Hi JD,

Both of those changes had already been applied to footer.php and functions.php from when I first installed WC.

I'd appreciate it if you have time to have a poke around. I've set up an account for you.

juggledad Feb 17, 2018 10:30 AM

send me a PM with the login info

Grum Feb 18, 2018 05:47 AM

Many thanks for your help on fixing those issues, JD. This is one of the reasons why I still love ATA as a theme !:)


All times are GMT -6. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.