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 6 of 6

Thread: How to Hide Variant Name in shopping cart & order reciept

  1. #1
    tom is offline Junior Member
    Join Date
    Nov 2009
    Location
    Calgary, Alberta, Canada
    Posts
    11

    Question How to Hide Variant Name in shopping cart & order reciept

    Hello;

    I have searched through the forum and am surprised that I could not find anything related to this. Perhaps I'm using the wrong key words...

    The title of this post says it all; I would like to hide the variant name associated with a product from being displayed in the shopping cart. I do not intend to make use of variants at all and by default, it seems that some products have a default variant called "(Unnamed Variant)" and others have "Default whatever-the-product-name-is". This makes for one ugly looking shopping cart list

    If anyone could fill me in, it would be appreciated.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    The default format of the product name when they're in the cart should be 'Product Name + Variant Name'. But, so far as I know, the application won't display anything on the variant name part if it's seeing 'Unnamed Variant', that's means it's empty or nothing to display. So, if you really don't want the product variant will appear on the receipt and in the shopping cart when customers add them, then just leave it as 'Unnamed Variant'.

  3. #3
    tom is offline Junior Member
    Join Date
    Nov 2009
    Location
    Calgary, Alberta, Canada
    Posts
    11

    Default

    Thanks for the feedback!

    While removing the variant name is the most straight-forward option, it is also the most time consuming since MANY of the products have a variant with this 'Default' name.

    There must be a faster way...? Can I not modify the cart to not display the variant name?

  4. #4
    Richnyc30 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    340

    Default Run SQL to change field

    Actually, if you know SQL or if someone would give you a SQL statement, you can do a mass update. I'm not the one to do such a statement to run somewhere else.

  5. #5
    tom.hundley is offline Junior Member
    Join Date
    Nov 2009
    Posts
    11

    Default

    Hi Tom.

    In version ML 8.0.1.2, default variances are created without a name thus giving you the behavior you're looking for. I'm not sure if there is a configuration setting that changes the default variant name, you have an older version (I'm new to using ASPDNSF and unfamiliar with previous versions), or your data was just entered that way.

    Nonetheless, for 8.0.1.2, this is the update statement you need to update all variant names to an empty string. It will only update products with one variant. I'm not sure if it will work on older versions since I don't know the schema.

    As always, backup your database before running any scripts like this.

    Code:
    update ProductVariant set Name = '' 
    where ProductId in 
    	(
    	-- selects products with only one variant
    	select ProductId from ProductVariant 
    	group by ProductID
    	having count(ProductID) = 1
    	)
    Hope this helps.

    Best regards,
    Last edited by tom.hundley; 01-08-2010 at 01:44 PM.
    Tom Hundley

    Elegant Software Solutions, LLC
    Managing Consultant
    http://www.elegantsoftwaresolutions.com
    http://www.totalcarewebsites.com

  6. #6
    tom is offline Junior Member
    Join Date
    Nov 2009
    Location
    Calgary, Alberta, Canada
    Posts
    11

    Default

    Yes, that did the trick, all the unnessasary variant names are gone. Thanks for your help!
    -- Tom