Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hundebol 167 posts 314 karma points
    Sep 23, 2011 @ 15:28
    Hundebol
    0

    Problem with variant styling

    Hi Tea Commerce guys,

    I have changed how the productList-Product.xslt show my products.

    This is no problem in itself. But when I change the variant on my products, the styling f*cks up.

    I can understand from another post, that, it's because it fetches another xslt (product.xslt I guess)

    But this really means, the my markup in product.xslt needs to be the same as my productList-Product.xslt to avoid this?

    best regards,
    Brian

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 25, 2011 @ 09:54
    Rune Grønkjær
    0

    Hi Hundebol,

    Sorry for the late answer, but here goes :)

    That is a pretty common problem you have there, which happens to me as well from time to time. You should be aware of and check the following:

    - When loading a single product in a product list your javascript is loading the productList-AjaxProduct.xslt
    - The productList-AjaxProduct.xslt, in turn, loads the productList-Product.xslt, which is the same used by the productList.xslt
    - Make sure that the productList-AjaxProduct.xslt is allowed for xslt invoking in the Tea Commerce sections general settings.
    - The javascript for updating the product is found in the updateProduct method in the teaCommerce_Simple.js

    If that's not enough to find the problem please write again and maybe tell me if you have changed any of the above. What does the firebug console tell you when you choose a new variant? How exactly does the styling frak up?

    /Rune

  • Hundebol 167 posts 314 karma points
    Sep 26, 2011 @ 08:32
    Hundebol
    0

    Hi Rune,

    Everything is correct, except one thing i have changed:

    - in productList.xslt the file you include is productList-Product. I have changed this to another XSLT file of my own, called productList-Product-Table (It's the same xslt really, the markup is just in tables instead of divs)

    And this is probably why the markup changes back to the div's, when changing variant.

    I have tried changing the include in productList-AjaxProduct to my own xslt as well (productList-Product-Table). This does nothing good.

    Hope you have the magic setting :)

    best regards,
    Brian 

     

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 26, 2011 @ 08:36
    Rune Grønkjær
    0

    Hi Brian,

    Ok, that's weird. But ofcause there's a sane explanation. Do you have a link to a page or maybe a few screenshots. If you don't want to go public you can mail them to me here: [email protected].

    It's probably just some tiny thing. It always is :)

    /Rune

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 26, 2011 @ 12:51
    Rune Grønkjær
    0

    Hahaah, I found your problem!

    You changed an id here:

     

    <!-- <div id="products" class="productList">  -->

    <table id="productTable"

    If you do that the javascript cannot know that it's a list it's supposed to update and loads the product.xslt instead. You can change either the id, OR you can change the javascript around line 33 in teacommerce_simple.js.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft