Welcome to Mediachase Community Sign in | Join | Help    
in Search   

Add to cart from Product listing page...

Last post Wed, Oct 15 2008, 12:12 AM by truthbrother. 5 replies.
Sort Posts: Previous Next
  •  Wed, Oct 01 2008, 12:38 AM 10385

    Add to cart from Product listing page...

    Hello,

    I am trying to add the Product Skues Module to the PagingProductTemplate (lists products within a category).

    I keep getting the error below. When I step through the code it looks like it is breaking when it is DataBinding the variations list. I am setting the product attribute in the skus control as follows:

    <uc1:ProductSkusModule ID="ProductSkusModule1" Product='<%# Container.DataItem %>' runat="server" />

    I thought this would be a fairly straight forward thing to do, allowing a customer to add to their cart straight from the product listing page without having to click through to the product page but I am unable to get it work currently.

    Any ideas?

    Andrew

    ps - I am running ECF 4.1.
    Object reference not set to an instance of an object. body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    Line 16:                             <HeaderStyle Width="150px"></HeaderStyle>
    Line 17:                             <ItemTemplate>
    Line 18:                                 <%# Mediachase.eCF.ClientLib2.Util.ClientHelper.GetAttributeByName("Name", ((Item)((RepeaterItem)Container.Parent.Parent.Parent.Parent.Parent).DataItem).ItemAttributes).Value[0]%><br />
    Line 19:                                 <ecf:PriceLineModule ID="PriceModule1" ListPrice='<%# DataBinder.Eval(Container.DataItem, "Price")%>'
    Line 20:                                     SalePrice='<%# DataBinder.Eval(Container.DataItem, "SalePrice")%>'

    Source File: c:\Projects\IrresistibleForce\PublicLayer\PublicStore\SharedModules\ProductSkusModule.ascx    Line: 18

  •  Wed, Oct 01 2008, 2:19 AM 10387 in reply to 10385

    Re: Add to cart from Product listing page...

    Well, it seems this feature is not available out of the box. You need the source code and modify the PriceModule.ascx code-behind. At least, that's how i did it.
  •  Wed, Oct 01 2008, 2:40 AM 10388 in reply to 10387

    Re: Add to cart from Product listing page...

    Yeah I have the source code, and have had a quick look. I was just wondering whether anyone had done it before and/or the MediaChase guys could pass something on.

    If you have any tips you could pass on that would appreciate it.

    Andrew
  •  Fri, Oct 03 2008, 10:06 AM 10397 in reply to 10388

    Re: Add to cart from Product listing page...

    Have you made any progress?  It appears that you will have to do some custom development. If you are still having problems, maybe someone else from my team can provide you with some direction. Please let us know.

    Mediachase Software
  •  Sat, Oct 11 2008, 5:23 PM 10416 in reply to 10397

    Re: Add to cart from Product listing page...

    Yes VictorGunta was kind enough to pass on his code and with a few tweaks I got it to work fine thanks.

    Andrew
  •  Wed, Oct 15 2008, 12:12 AM 10439 in reply to 10416

    Re: Add to cart from Product listing page...

    Great, glad to hear that you got it working. Thanks for sending us an update.

    Mediachase Software
View as RSS news feed in XML
Site Terms | Privacy Policy | About Us | Contact Us
Running on Mediachase eCommerce Framework 4.0.
  Copyright © Mediachase, LTD. 1997-2006. All Rights Reserved

E-commerce, HelpDesk, Service Desk & Project Management Software, alternatives to Microsoft Project Server & Sharepoint Collaboration Server
project management software | microsoft project server | sharepoint collaboration server | issues management, helpdesk & service desk
Powered by Community Server, by Telligent Systems