Marketpress weird stuff happening...

1. The product page is not displaying correctly...
http://www.zoo-baby.com/shop/products/

There is only 1 product I have added as a test product - on the products page however it seems to be pulling the details in twice, first in an unformatted way and second in the proper formatted way.

It has also pulled an image from the last blog post!?

2. It is adding an extra text field which is not supposed to be there, I believe in belongs in the meta section? It has done this on other pages as well, in fact it seems to be all pages from shopping cart right through the checkout process.
http://screencast.com/t/R05YhDafFck

3. The shopping cart widget title sometimes disappears...
http://screencast.com/t/Tsv4cvV0ZG

4. When I change the status of "Test Product" back to Draft it still appears in the product listings and I can still purchase it...???

Hmmm... I think that's all for now!

Please help me get it fixed up!

  • DavidM

    Hi ebillias,

    It looks like your theme may be handling things in a non-standard way. To check that, you could try switching to Twenty Eleven momentarily for testing.

    If that's the case, it may be that you'll have to utilize MarketPress template files, as detailed in the Themeing_MarketPress.txt file in /marketpress-includes/themes/ in the MarketPress folder.

    You can essentially make copies of your theme's files and then rename and customize them for use with MarketPress. For example, you could create a copy of your theme's single.php file, rename it mp_product.php and customize that how you'd like it to look and function.

    Hope that helps, please let me know if you have any questions on this!

    Thanks,
    David

  • Elle Billias

    Thanks David, that will solve 1 & 2, now while I am doing all this customising...
    I'm guessing I will have to contact StudioPress because there is no such single.php as part of Genesis.

    Can I modify the template-functions? Or should I create a copy in my page-template file? I'm not much in to PHP but I'm getting smarter by the day lol, but what is the best practice to modify the functions, the main thing I am interested in modifying is the actual output divs, tables etc

    And how about my other problems 3 & 4?

    Thank you

  • Elle Billias

    Ok well I solved #1

    1. The product page is not displaying correctly...
    http://www.zoo-baby.com/shop/products/
    There is only 1 product I have added as a test product - on the products page however it seems to be pulling the details in twice, first in an unformatted way and second in the proper formatted way.
    It has also pulled an image from the last blog post!?

    The product page is somehow influenced by the Content Archive Settings found in the Genesis Settings menu. Because I had altered these settings it was adding a "featured image" and "excerpt" to the top of the page.

    If I were to write a custom template for the product page would this overwrite any settings that Genesis may use for the standard blog type "archive" pages (category, author, blog etc)?

  • Elle Billias

    No, I do not use a caching plugin.

    As for writing a template for MarketPress, you'd generally use your existing templates as a base and then just customize how you'd like it to look from there.

    What existing templates would that be?

    I have looked through the themeing txt file and get the concept, however I couldn't seem to find what it is I am supposed to start with... is there a base template like there is in the shipping plugins folder.

    It seems like you have to know a whole lot of code to get this to work - I also downloaded the gridmarket theme and had a look at their templates (way over my head). I wish it was more like Genesis where you just unhook the bit you want to change instead of having to write a new one completely from scratch!

  • Elle Billias

    So it's been a few days...just wondering if these issues are going to be resolved? I am seriously considering changing ecommerce plugins because I really don't wish to become a PHP developer and shouldn't have to just to tweak a few things to suit my clients.

    1. The products page is not displaying correctly...
    What actually happens here is that if the Genesis Settings for the blog/archive/category/tag pages are set to use excerpts and show featured images this somehow translates to the product listings page and it displays a random featured image from the blog as well as condensing all the product excerpts in to one big block of unformatted text.

    2. It is adding an extra text field which is not supposed to be there, I believe in belongs in the meta section? It has done this on other pages as well, in fact it seems to be all pages from shopping cart right through the checkout process.
    http://screencast.com/t/R05YhDafFck
    3. The shopping cart widget title sometimes disappears...
    http://screencast.com/t/Tsv4cvV0ZG
    The shopping cart widget title disappears IF I choose "empty cart" it won't come back until I view another page

    There seems to be some kind of conflict here with either Ajax/Javascript that is causing issue #2 & #3

    Could somebody please address these issues as MarketPress should play nice with leading theme frameworks...

  • Aaron

    1. That's just a weird nonstandard thing that genesis does aparently. It's filtering and inserting stuff into 'the_content' hook. Nothing that MarketPress can do about it. You'll just need to turn that off or use a custom template or a different theme.

    2. Looks like your theme or maybe a plugin is calling wp_header() inside your body tag. No idea why it would do that. From the source it looks like it might be related to a facebook plugin? Try deactivating it.

    3. Hmmm, seems to be a css selector conflict when you add an item to the ajax cart. I should be able to fix in MarketPress.

  • Elle Billias

    #2 Thanks Aaron, I will try deactivating the plugins and see if that helps :slight_smile:

    Have been able to solve #2 with help from StudioPress by lowering the priority on the title filter - if anyone else has the same problem they can search over at the studiopress forums and they will find my answer.

    Could you help me out with some other things I have been trying to accomplish:

    Shopping Cart Page
    • Add "empty cart" link to shopping cart page
    • Customize "checkout now" and "update cart" text
    • Add class to table rows for styling
    • Cart page title does not update as proceeding through checkout process ie. Cart > Shipping > Payment > Confirmation > Success

    Product Categories Pages
    • Modify Product Category page heading
    • Remove "filed under" from product category page
    • Remove description from product category page

    Product Page
    • Change quantity text
    • Change "categorized in" text
    • Show qty available
    • Change Add to Cart text

    Hopefully you have some filters that I can tap in to to easily adjust the text in most places :smiley:

  • Aaron

    Shopping Cart Page

    • Add "empty cart" link to shopping cart page

    Just link to cart page with ?empty-cart=1 on the end. http://wp.local/store/shopping-cart/?empty-cart=1

    • Cart page title does not update as proceeding through checkout process ie. Cart > Shipping > Payment > Confirmation > Success

    That would be an artifact from your theme using a nonstandard title handling. If you switch to another theme you'll see it filtered.

    Almost all those other text things you want filtered are wrapped in i18n functions. So a new language file or a plugin like https://premium.wpmudev.org/project/site-wide-text-change/ but that covers the front end could do it. Not sure if ours does the front end. If not you'll be needing to use the gettext filter: http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

  • Aaron

    We filter 'wp_title', 'single_post_title', 'the_title', and 'bp_page_title'. Any theme that uses http://codex.wordpress.org/Function_Reference/wp_title should be fine. This is the proper function to use for themes, see twentyten and twentyeleven WP themes for an example.

    http://codex.wordpress.org/Function_Reference/the_title shouldn't be used in title tags because it only works in the loop, and is designed for the title usually in H tags which marketpress filters fine.

  • Elle Billias

    Genesis uses "get_the_title()" which is important for efficiently building the code output and allowing it to be filtered if needed via "genesis_post_title_output" They should probably filter that isntead of filtering the_title() directly

    How can I make it work? Genesis is important in my sites and so is MarketPress - how can we improve so they play nice together?

    I heard a mention of is_shop() function but haven't been able to get it to work? Is this function still available because I don't see the class "shop" added to the body classes on shop pages.

  • Elle Billias

    Beats me actually...I installed on the client's site today and their site doesn't have the issue!?

    Weird thing is on my dev site I didn't have ANY plugins at all activated so who knows why that site wasn't showing the proper titles. Guess I'll just have to let it go...lol

    Almost all those other text things you want filtered are wrapped in i18n functions. So a new language file or a plugin like https://premium.wpmudev.org/project/site-wide-text-change/ but that covers the front end could do it. Not sure if ours does the front end. If not you'll be needing to use the gettext filter: http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

    I'm probably going to use gettext... do I put this in the functions file? Would you be able to give an example of how to use it for say the Add to Cart ?

  • Aaron

    Well try the plugin first. If that doesn't work on the front end (not sure if the latest version does or not), then just use the excellent examples in that codex link. You could put in function.php but if you want it to survive theme updates make it a plugin.

    add_filter('gettext', 'remove_admin_stuff', 20, 3);
    function remove_admin_stuff( $translated_text, $untranslated_text, $domain ) {
        if ( $untranslated_text === 'Add to Cart' ) {
            return 'Put in Cart';
        }
    if ( $untranslated_text === 'categorized in' ) {
            return '';
        }
        return $translated_text;
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.