Help: 2x shippingcost regions, using radio buttons

Problems installing or using the NOP Design Free Shopping Cart that do not fit into one of the above categories.

Moderators: Koibito, Stefko, Randy

Help: 2x shippingcost regions, using radio buttons

Postby opa » Tue Oct 19, 2010 11:36 pm

Hello,

Ask for help.
Try make 2 regions with different / extra shipping cost using radio buttons.
try all kind of ways for some weeks but not able to get it running to get the radio buttons show the total cost

Region 1 = 5.00 standard shipping cost i use
Region 2 = 2,00 extra above the 5,00 for this region ( a total 7,00 shipping )

I try below code but using radio button the 2,00 extra costs not show i the total amount;

Code: Select all
  strOutput += "<TR><TD CLASS=\"ZWART-12\" COLSPAN=4>"+strREG+"</TD>";
  strOutput += "<TD CLASS=\"ZWART-12\" COLSPAN=2>";
  strOutput += "<input type=radio name=\""+region+"\" value=\"0.00\">";
  strOutput += Region1 + ": " + "0.00";
  strOutput += "<BR><input type=radio name=\""+region+"\" value=\"2.00\">";
  strOutput += Region2 + ": " +"2.00";
  strOutput += "</TD>";
  strOutput += "<TD CLASS=\"ZWART-10\">&nbsp;</TD>";
  strOutput += "</TR>";
   
  if ( !TaxByRegion ) {
  strOutput += "<TR><TD CLASS=\"ZWART-12\" COLSPAN=4 ALIGN=RIGHT>" +strTOT+ " &nbsp;&nbsp;</TD>";
  strOutput += "<TD CLASS=\"ZWART-22\" COLSPAN=2 ALIGN=LEFT BGCOLOR=#ACACFF>&nbsp;&nbsp;&nbsp;" + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + " </TD>";
  strOutput += "<TD CLASS=\"ZWART-10\">&nbsp;</TD>";
  strOutput += "</TR>";
      }
 strTaxTot = moneyFormat(((fTotal+fShipping)/1.19) * 0.19);
  strOutput += "<TR><TD CLASS=\"ZWART-12\" COLSPAN=4 ALIGN=RIGHT>" +strTAX+ "&nbsp;&nbsp;&nbsp;" + MonetarySymbol +  strTaxTot + "&nbsp;&nbsp;&nbsp;&nbsp;</TD>";
  strOutput += "<TD CLASS=\"ZWART-10\" COLSPAN=2 BGCOLOR=#ACACFF></TD>";
  strOutput += "<TD CLASS=\"ZWART-10\">&nbsp;</TD>";
  strOutput += "</TR>";
  strOutput += "</TABLE>";
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands

Re: Help: 2x shippingcost regions, using radio buttons

Postby Stefko » Thu Oct 21, 2010 8:39 am

Opa,

You will need some sort of onclick action, to perform the math a way for the cart to know if this radio was selected
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Re: Help: 2x shippingcost regions, using radio buttons

Postby opa » Sat Oct 23, 2010 10:36 am

Thank you,
for some days I try all kind of ways using several onClick functions
But get hopeless stuck in it.

When onClick on the radio buttons 0.00 or 2.00
the shipping cost amount is not show in the shipping row.
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands

Re: Help: 2x shippingcost regions, using radio buttons

Postby opa » Thu Nov 25, 2010 1:33 am

Help:

How to make this code using radio buttons instead of a dropdown select ?

"<SELECT name=shipMethod class=ZWART-16 onChange=\"ChangeShipping(this.options[this.selectedIndex].value)\">" +
"<OPTION VALUE=Nederland " + (shipMethod == "Nederland" ? ' SELECTED' : '') + "selected>Nederland</OPTION>" +
"<OPTION VALUE=Belgie" + (shipMethod == "Belgie" ? ' SELECTED' : '') + ">Belgie</OPTION>" +
"</SELECT>"
Voor hulp in de Nederlandse taal alleen voor de nopcart.js of checkout.pl
opa
WebMaster
 
Posts: 135
Joined: Tue Jan 10, 2006 4:17 pm
Location: Netherlands


Return to Help: Cart / General

Who is online

Users browsing this forum: Exabot [Bot], wuhuilin11 and 5 guests