Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: entity.gridwithprices.xml.config

  1. #1
    vacshack is offline Junior Member
    Join Date
    Jul 2011
    Posts
    13

    Default entity.gridwithprices.xml.config

    Hi,
    Couple of Questions, For ML8. I am running almost completely stock on my site.

    Can some one help me add the "Add to Cart Button" to the grid in the categories that are using entity.gridwithprices.xml.config ?

    Is there a way of getting the table/ grid on this layout to force a certain height of the cells? Currently when the product title is long or if we have a sale price in addition to the price the rows are crooked e.g. auto sized. I guess justifying the cells to the top instead of the bottom of the cell would work too.

    Adding the first 100 or 200 characters of the description to this might be a possibility, depending on how it looks when it is done.

    Is it wiser / easier to create a new xml package rather than hosing the the stock one?

  2. #2
    donttryathome is offline Senior Member
    Join Date
    Apr 2009
    Posts
    171

    Default

    To place the add to cart form on your entity page place the following code into entity.gridwithprices.xml.config wherever you want it to display:

    Code:
    <xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 0, 'right')" disable-output-escaping="yes" />
    Note: I'm pretty sure this can cause issues if you're displaying a product with multiple variants and/or color-size options. I think it only adds a default variant to the cart, although I am not certain about the actual behavior.

    You can change table/cell attributes inside the XML package. Look for the appropriate <table> <tr> and <td> elements and apply attributes as you see fit. You'll most likely be interested in the HTML contained within the <xsl:template name="ProductCell"> template area.

    You're probably safe altering the stock XML package if you aren't making any drastic changes. Just make a backup copy of the XML package first so if you do end up hosing it you've got a restart point.
    Running: AspDotNetStorefront ML 8.0.1.2/8.0.1.2

  3. #3
    vacshack is offline Junior Member
    Join Date
    Jul 2011
    Posts
    13

    Default Groovy

    That is the best response I have ever been given on this forum. Thank you. The Addtocart button worked perfect and as you stated it uses the default variant on items that have multiple variants which brings in a whole new problem for me. I assume there is a fix for that also, but I am technically challenged so I am not sure if I want to tackle that. Do you know what others have done for this?

    As far as cell size for the table, I am not sure I can improve by changing the justification. Maybe my OCD is getting in my way here.

  4. #4
    donttryathome is offline Senior Member
    Join Date
    Apr 2009
    Posts
    171

    Default

    I assume there is a fix for that also, but I am technically challenged so I am not sure if I want to tackle that. Do you know what others have done for this?
    A "fix" is probably possible depending on what exactly you want it to do. The real problem is that only the customer knows which variant they actually want added so there isn't really anything you could do to the cart to improve that functionality (at least not without major modifications to the source and xml packages).

    You may want to check out this forum thread:
    http://forums.aspdotnetstorefront.co...riant-products

    That mod places a "This product has options!" text link above to the add to cart form for products that have multiple variants. You could alter that modification to hide the add to cart button for products that have multiple variants. Products with one variant would show the add to cart button. Products with multiple variants would show a "This product has options!" text which links directly to the product's page. I think that is how I, personally, would handle the situation.

    As for cell size and placement, designing and making your product pages look pretty is a whole new monster in itself. It's somewhat difficult to explain how to make design changes without knowing what you look like now and what you want to look like.
    Running: AspDotNetStorefront ML 8.0.1.2/8.0.1.2