Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[SOLVED] Help setting up page template for Jigo Shop


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Feb 14, 2013, 04:47 AM
Tim F
 
66 posts · Jul 2009
Hi all!
I am trying to get the Jigo Shop plugin working with atahualpa (currently testing with ata 3.5.1).
It mostly works, but it is displaying my sidebar underneath posts created by the plugin.

I found the following instructions on getting Jigo shop to work with themes:
http://forum.jigoshop.com/kb/customi...t-for-jigoshop (most helpful)
http://forum.jigoshop.com/kb/customi...-with-jigoshop (more technical?)

Basically it looks like I have to hook in atahualpas content wrappers to 2 of the plugin functions so that the plugin can use the correct code before and after the_post.

However this is a tiny bit over my head as the atahualpa wrappers don't really look like the linked to examples - there are no divs in index.php and I am not sure how much to hook in to the 2 functions. My stabs in the dark so far are just returning various PHP errors.

Could anyone suggest what the following 2 functions should contain, where XXX is what should appear before and after the_post respectively?
Code:
function mytheme_open_jigoshop_content_wrappers()
{
    echo 'XXX';
}

function mytheme_close_jigoshop_content_wrappers()
{
    echo 'XXX';
}
I could only see this raised here once before but no solution found.
Many thanks for any suggestions!
  #2  
Old Feb 14, 2013, 05:15 AM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
what is the url of your site?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Feb 14, 2013, 06:02 AM
Tim F
 
66 posts · Jul 2009
This is a product page created by the plugin on my test site, showing the problem http://muffbomail.info/plugin/?product=another-product
  #4  
Old Feb 14, 2013, 10:16 AM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
The issue seems to involves some assumptions the plugin makes that are not always valid. With this in mind, a fix for this issue is most likely going to involve digging into the plugin's code to determine what is needed to be done which is beyond the free support provided here.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Feb 14, 2013, 03:35 PM
Tim F
 
66 posts · Jul 2009
Thanks for taking the time to consider the issue anyway! Do you have any advice about what assumptions the plugin is making?

I will post the solution when I figure it out (eventually)
  #6  
Old Feb 14, 2013, 06:31 PM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
It assumes all themes will be built like twenty eleven. Atahualpa is not. When you put in the code they suggest, Atahualpa builds the left sidebar, then they do. So someone will have to dig into their code to determinw how to change it to not display their version of the side bar. in addition I suspect they are using the same global that the theme uses and changing it's value which messes up the right sidebar (?) and footer.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Feb 15, 2013, 12:42 AM
Tim F
 
66 posts · Jul 2009
Well here's the first bit - this removes the sidebar added by jigoshop itself. The next step is to figure out exactly what I need to hook in from the atahualpa theme files to have pages created by jigoshop use all of atahualpas content wrappers.

Is index.php the ata file that puts together all of the page elements or should I be looking somewhere else?

Code:
function ata_prepare_jigoshop_wrappers()
{
    remove_action( 'jigoshop_sidebar', 'jigoshop_get_sidebar', 10 );
}
add_action( 'wp_head', 'ata_prepare_jigoshop_wrappers' );
?>
  #8  
Old Feb 15, 2013, 04:24 AM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Ok, you triggered something in my mind. Jiggo shope is like WP e-Commerce, it is using SESSION's which is messing up the themes variables. So do the following
1) edit functions.php and add the following right BEFORE the last '?>'
HTML Code:
function mytheme_prepare_jigoshop_wrappers()
{
    remove_action( 'jigoshop_sidebar', 'jigoshop_get_sidebar', 10 );
    remove_action( 'jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 10 );
    remove_action( 'jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 10);

    add_action( 'jigoshop_before_main_content', 'mytheme_open_jigoshop_content_wrappers', 10 );
    add_action( 'jigoshop_after_main_content', 'mytheme_close_jigoshop_content_wrappers', 10 );
}
add_action( 'wp_head', 'mytheme_prepare_jigoshop_wrappers' );
2) edit footer.php and change line 3 from
HTML Code:
if (!isset($bfa_ata))  
to
HTML Code:
if ((!isset($bfa_ata)) or (defined( "JIGOSHOP_VERSION" )) ) 
go and test it
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Feb 15, 2013, 03:49 PM
Tim F
 
66 posts · Jul 2009
Excellent, looks like it is working! The footer thing was the main part of the puzzle, the post displayed after adding that with just a little wrong with the post formatting. I hooked back in the open & close functions as well as your script - so the complete script to add to functions.php is:

Code:
function ata_open_jigoshop_content_wrappers()
{
    echo '<div><div><div>';
}

function ata_close_jigoshop_content_wrappers()
{
    echo '</div></div></div>';
}
function ata_prepare_jigoshop_wrappers()
{
    remove_action( 'jigoshop_sidebar', 'jigoshop_get_sidebar', 10 );
    remove_action( 'jigoshop_before_main_content', 'jigoshop_output_content_wrapper', 10 );
    remove_action( 'jigoshop_after_main_content', 'jigoshop_output_content_wrapper_end', 10);

    add_action( 'jigoshop_before_main_content', 'ata_open_jigoshop_content_wrappers', 10 );
    add_action( 'jigoshop_after_main_content', 'ata_close_jigoshop_content_wrappers', 10 );
}
add_action( 'wp_head', 'ata_prepare_jigoshop_wrappers' );
Many thanks for the assistance.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
want to password protect the store/shop tlck9 Plugins & Atahualpa 0 Feb 6, 2013 02:15 PM
remove Archives on Shopp 'shop' page cway Center area post/pages 1 Jun 1, 2012 04:09 PM
Customize text template as setting in ATO>>Sidebars & Widgets>>Style Widget bigliettaio Sidebars & Widgets 4 Jan 17, 2010 02:18 PM
[SOLVED] Ecwid Shop Plugin and Ata Liston eCommerce & Atahualpa 8 Nov 24, 2009 06:03 AM


All times are GMT -6. The time now is 11:22 PM.


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