More in this section

Forums / Developing with Sitefinity / basic shopping cart/quote module?

basic shopping cart/quote module?

6 posts, 0 answered
  1. Mark
    Mark avatar
    86 posts
    Registered:
    08 Feb 2010
    08 Feb 2010
    Link to this post
    Hi, I need to create some basic functionality that will show a list of products names with quantity drop down boxes next to them

    i.e.

    qty    product         Price
    ---     ----------        --------
    0       Bread            10 
    0       Milk                10
    0       Eggs              10
    1       Wine              50

    Total: $50


    Each quantity box will default to 0, and every time you change the quantity, the total must be updated
    I would also like the ability to modify product names & price

    Are there any modules/controls that can acheive this
    if not, could I extend any existing module to acheive this?

    I'm not looking to buy online etc, it will simply be emailed to the owner
    (its basically a contact form, that does calculations and can be modified)

    Is there a simple solution to this ?

    Thank you





  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    08 Feb 2010
    Link to this post
    Hi Dave,

    As far as I know, there are no default modules for shoppingcart functionality. (maybe on the marketplace?)

    You could easily extend the GenerictContentModule to implement the basics and then extend them for your shoppingcart.

    But if it is just as simple as you describe in your post, a really simple UserControl will also do it.
    The advantage of extending the GenerictContentModule over a UserControl is that you also could create the backend functionality and it comes default with 'Workflow', 'Categories and Tags', History etc... (see the manual for all functionality)

    Does that help?

    Best regards,
    Daniel Plomp
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Feb 2010
    Link to this post
    Hi Dave Davies,

    There is no built-in module or control that can calculate the quantity of products.  Generally you can use one of the built in modules as a backend. You can create a metakey which will be the price of each product. You will need another metakey that will be used to persist this value if you want to save it. For your public control you needs product, add/remove buttons which changes the quantity, literal that shows the quantity and another label that shows the quantity per item and calculates the price of the items using basic ASP.NET.

    Then another lable willl show the total proce - just simple calculation of all products that have been selected. Also when you click on add/remove buttons you can use jQuery - html attribute to change the text values or make a post back -  here you can use UpdatePanel and coockie or session to persist the data after post back.

    You mayfind the following example useful - Grid / RadNumericTextBox for Footer Totals

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  4. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    08 Feb 2010
    Link to this post
    Hi Dave,

       I have been messing with LinqCommerce.  It has some toolbox controls writtten in for Sitefinity. 

    However the last time I check there is no modules written for Sitefinity backend yet.  That is on my list of things to tryout I just pick up a book by the guy who wrote this code explaining the Eccomerce system

    It is open source, and well written, plus I like the concept.  I plan on contributing to the project.  You can find more info at: http://www.codeplex.com/linqcommerce

    David
    Have a good code day!
  5. Mark
    Mark avatar
    86 posts
    Registered:
    08 Feb 2010
    09 Feb 2010
    Link to this post
    Thanks all

    I like the idea of a simple user control.
    However, i'm not sure how i could incorporate something that you can add/remove items

    i've seen a user control on the market place that looks like you can add/remove fields
    http://www.sitefinity.com/marketplace/modules/event-module-registration-form-builder.aspx

    So i guess i could use something like that, and cycle through each qty/price and update the total?

    Does that sound possible?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Feb 2010
    Link to this post
    Hello Dave,

    However, i'm not sure how i could incorporate something that you can add/remove items


    You could use properties with predefined items ( say RadComboBox) with your products. Another option is adding the items dynamically. The easiest way to save the data from the dynamically added controls is persisting the data to a database as array when you post back and then retrieving the same data on  the next screen where you have to recreate the control. The third option is using AJAX toghether with WebService to persist the data on the client withouth making post back.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Register for webinar
6 posts, 0 answered