Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Interesting Challenge - I could use some direction
Last Post 05-21-2012 09:41 AM by Administrator Account. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Dan C.User is Offline
river guide
river guide
Posts:82
Avatar

--
04-23-2012 04:44 AM
    I have a working DS Form that contains multiple items and calculates multiple sub-totals and adds a fixed rate for shipping.

    I am currently using a fixed shipping rate for all items, but now it appears international orders will need a different shipping rate (as well as different shipping rates for different items, unless bought in combination.)

    I realize this is starting to sound like a full shopping cart solution but I am trying to avoid that answer. 

    My question - What methods (demonstration #) should I focus on adopting to make this work? 

    For example, I'm using the DNN Country DS field that automatically pulls the portal country list. Is it possible to query the same table with SQL or us DS to focus on that fields result?

    Seems like a button to trigger a shipping calculation will be necessary.
    Any thoughts?
    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    04-24-2012 06:45 AM
    Ok, I think I have a plan of attack - Question: if I use the SQL option "....where fieldName = $(preceedingField)..."

    How can I specify the value the preceeding field should equal to reveal the current field?
    Like, show current field "...where fieldname = $(DNNCountry) = "United States".
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-24-2012 04:03 PM
    Hi Dan - Well, for performance reasons (and to avoid post backs and so forth) I guess my suggestion would be to use client side events, and then determine from an if statement within JavaScript what the value should be. This could be somewhat difficult though if you are also using the DNN Country field type as I think getting access to that field works differently then a standard dropdownlist when it comes to $(Tokens) etc... If this were a dropdownlist or combo box field I would probably suggest going the route of maybe Demo 7 because I think this covers some if statements with client side events (when a checkbox is checked or not checked etc...)

    Going this route... I would probably suggest suggesting out Demo 10 I believe which has "Dependent Dropdownlists". So you could setup SQL Options to possibly bring back unique values depending on the country selected.


    Thanks,

    Chad
    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    04-26-2012 09:38 AM
    I have decided to simplify which is going to lead to another question before I can solve both challenges....

    I have 2 fields representing to products - WidgetA, WidgetB;
    Shipping on WidgetA = $8
    Shipping on WidgetB = $2
    Shipping on Widget A & B = $8.

    The total amount ordered for WidgetA is captured in field "HiddenWidgetATotal".
    The total amount ordered for WidgetB is captured in field "HiddenWidgetBTotal".
    The subtotal of widget A and B are captured in a field "HiddenSubTotal".
    The shipping total will be captured in a field "HiddenShippingTotal"

    In a Field Custom_HTML_Shipping_Total it will display if shipping is $8 or $2.

    I believe I need to code a Client Side Event with this logic:

    if ( $(HiddenWidgetATotal)+$(HiddenWidgetBTotal) = $(HiddenSubTotal))
    $(HiddenShippingTotal) = 8
    else
    $(HiddenShippingTotal) = ''
    if ( $(HiddenWidgetBTotal) = $(HiddenSubTotal))
    $(HiddenShippingTotal) = 2
    else
    $(HiddenShippingTotal) = ''
    if ( $(HiddenWidgetATotal) = $(HiddenSubTotal))
    $(HiddenShippingTotal) = 8
    else
    $(HiddenShippingTotal) = ''


    I don't know the exact syntax to handle these event(s) nor do I know if my logic for setting up these fields is correct or if all are necessary. I believe by specifying it in this manner it best explains my requirements even if it isn't the most efficient.

    I would be very grateful for any wisdom or assistance.

    Thanks - Dan
    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-21-2012 03:49 AM
    If you need an ORDER FORM with conditional formulas in the client-side events you must read this post.

    Previously I was attempting to describe how I needed a form that understood that if Product A (shirts actually) was ordered use shipping rate of $8; if only Product B (decals) was ordered use a rate of $2; if both ordered then use $8 (regardless of quantities).

    Below is the logic used and should be able to be applied elsewhere (psst - this can save you $).

    Details - this code is applied to the decal amount fields. the 2nd section is changed for the shirts. The 4th section contains the if then logic. It's really important to keep the parenthesis well formed. Dynamic Forms is in desperate need of a Java compiler for error checking.


    var numDecal
    numDecal=parseInt($(DecalA))+parseInt($(DecalB))+parseInt($(DecalC))
    var numShirt
    numShirt=parseInt($(LgShirt))+parseInt($(ExLgShirt))+parseInt($(XXLgShirt))+parseInt($(XXXLShirt))

    $(TotalDecalHidden) = (numDecal*4.95).toFixed(2)
    $(SubTotalHidden) = (parseFloat($(TotalShirtHidden))+parseFloat($(TotalDecalHidden))).toFixed(2)

    document.getElementById('SubTotalDecal').innerHTML = 'Decal Subtotal: ' + formatCurrency($(TotalDecalHidden)) + ''
    document.getElementById('SubTotal').innerHTML = 'Subtotal: ' + formatCurrency($(SubTotalHidden)) + ''

    if (parseInt(numShirt) > parseInt(0))
      $(HiddenShippingTotal)=parseFloat(8.00).toFixed(2)
    else 
    if (parseInt(numDecal) > parseInt(0))
    $(HiddenShippingTotal)=parseFloat(2.00).toFixed(2)
    else 
    $(HiddenShippingTotal)=parseFloat(0.00).toFixed(2)

    document.getElementById('ShippingTotal').innerHTML = 'Shipping Amount: ' + formatCurrency($(HiddenShippingTotal)) + ''
    $(GrandTotalHidden)=(parseFloat($(SubTotalHidden)) + parseFloat($(HiddenShippingTotal))).toFixed(2)
    document.getElementById('GrandTotal').innerHTML = 'Your Grand Total Comes To: ' + formatCurrency($(GrandTotalHidden)) + ''

    Administrator AccountUser is Offline
    going with the flow
    going with the flow
    Posts:48
    Avatar

    --
    05-21-2012 09:41 AM
    Hi Dan - Thanks so much for posting this... I believe this will be very useful for others!

    Thanks,

    Chad
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi