close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Having a problem sending toogle option selections to the cart display and customer / store receipt

Thread began 6/28/2013 2:26 pm by elewis93815 | Last modified 7/01/2013 1:22 pm by elewis93815 | 350 views | 6 replies |

elewis93815

Having a problem sending toogle option selections to the cart display and customer / store receipt

We have created a section of a shopping cart "Small Sandwich Platters" that have several sandwich options.
The customer is allowed to choose up to 4 options of sandwiches and then select add to cart. The sandwich options are listed, however, they are not showing in the order display. The "Large Sandwich Platter" which is a section I worked on some time ago with Jason or Ray works just fine with the sandwich options showing in the description section of the order display. I'm just having trouble getting the "Small Sandwich Platter" to display. I have attached the relevant files to this post. Any direction would be greatly appreciated.

Attached Files
WA Catering 6-28-13.zip
Sign in to reply to this post

Jason ByrnesWebAssist

1) The checkboxes for the small sandwich platter are named:
Sandwiches[]2

that needs to be changed to:
Sandwiches2[]


2) the add to cart code for the small platter is at lines 345 - 380:

php:
<?php

// WA eCart AddToCart
if (isset($_POST["cupcake1_13_ATC"]) || isset($_POST["cupcake1_13_ATC_x"]))     {
  
$ATC_itemID $_POST["cupcake1_13_ID_Add"];
  
$ATC_AddIfIn 0;
  
$ATC_RedirectAfter "order_display.php";
  
$ATC_RedirectIfIn  "";
  if (isset(
$totalRows_rsCaterLunch) && $totalRows_rsCaterLunch 0)     {
    
$row_rsCaterLunch WAEC_findRecordMySQL($rsCaterLunch"PRODUCTID"$ATC_itemID);
    if (
$row_rsCaterLunch)     {
      
$ATC_itemName "Small Sandwich Platter";// column binding
      
$ATC_itemDescription "";// column binding
      
$ATC_itemWeight floatval("0");// column binding
      
$ATC_itemQuantity "".$_POST["cupcake1_13_Quantity_Add"]  ."";// column binding
      
$ATC_itemPrice floatval("34.95");// column binding
      
$ATC_itemPlatterOptions "";// column binding
      
$ATC_itemTaxable "1";// column binding
      
mysql_data_seek($rsCaterLunch0);
      
$row_rsCaterLunch mysql_fetch_assoc($rsCaterLunch);
    }
  }
  
$ATC_itemQuantity floatval($ATC_itemQuantity);
  if (
is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0)     {
    
$cupcake1->AddToCart($ATC_AddIfIn$ATC_RedirectIfIn$ATC_itemID$ATC_itemName$ATC_itemDescription$ATC_itemWeight$ATC_itemQuantity$ATC_itemPrice$ATC_itemPlatterOptions$ATC_itemTaxable);
    if (
$ATC_RedirectAfter != "" && $cupcake1->redirStr == "")     {
      
$cupcake1->redirStr $ATC_RedirectAfter;
    }
    if (isset(
$_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "")  {
      
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
    }
    else  {
      
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
    }
  }
}
?>




line 360 sets the options:

php:
$ATC_itemPlatterOptions = "";// column binding




change that to:

php:
$ATC_itemPlatterOptions = "".((isset($_POST["Sandwiches2"]))?implode(", ",$_POST["Sandwiches2"]):"")  ."";// column binding
Sign in to reply to this post

elewis93815

Thank you Jason! I have updated line 360 as well as changed the Sandwiches[]2 to Sandwiches2[] and the sandwich options are still not showing???? i've attached the new files after the recent changes.

Attached Files
WA Catering 2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the checkboxes are a part of a seperate form from the add to car buttons.

change:

php:
<form name="cupcake1_13_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" method="POST"  action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>">

                        <input type="hidden" name="cupcake1_13_ID_Add" value="<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" >
                        <input type="text" name="cupcake1_13_Quantity_Add" value="1" size="4" >
                        <input type="submit" class="eC_FormButton" value="Add to Cart" name="cupcake1_13_ATC">
                      </form>
                      <form  action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>" method="post" name="cupcake1_11_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" id="cupcake1_11_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>2">
                        <br />
                        <table width="400" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="45"><input type="checkbox" name="Sandwiches2[]" value="smoked Turkey" /></td>
                            <td width="355">Smoked Turkey</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="BLT" /></td>
                            <td>BLT</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Tuna Salad" /></td>
                            <td>Tuna Salad</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Club" /></td>
                            <td>Club</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Brie and Apple" /></td>
                            <td>Brie and Apple</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Pesto" /></td>
                            <td>Pesto</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Hummus Wrap" /></td>
                            <td>White Bean Hummus Wrap</td>
                          </tr>
                        </table>
                      </form></td>
                  </tr>
                </table>




to:

php:
<form name="cupcake1_13_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" method="POST"  action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>">

                        <input type="hidden" name="cupcake1_13_ID_Add" value="<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" >
                        <input type="text" name="cupcake1_13_Quantity_Add" value="1" size="4" >
                        <input type="submit" class="eC_FormButton" value="Add to Cart" name="cupcake1_13_ATC">
                      
                        <br />
                        <table width="400" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="45"><input type="checkbox" name="Sandwiches2[]" value="smoked Turkey" /></td>
                            <td width="355">Smoked Turkey</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="BLT" /></td>
                            <td>BLT</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Tuna Salad" /></td>
                            <td>Tuna Salad</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Club" /></td>
                            <td>Club</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Brie and Apple" /></td>
                            <td>Brie and Apple</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Pesto" /></td>
                            <td>Pesto</td>
                          </tr>
                          <tr>
                            <td><input type="checkbox" name="Sandwiches2[]" value="Hummus Wrap" /></td>
                            <td>White Bean Hummus Wrap</td>
                          </tr>
                        </table>
                      </form></td>
                  </tr>
                </table>
Sign in to reply to this post

elewis93815

Sorry, but can you tell me where this code starts and stops. I did a find on this code and it's not finding it. Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

you just need to delete lines 765 - 766:

php:
</form>

                      <form  action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>" method="post" name="cupcake1_11_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>" id="cupcake1_11_ATC_<?php echo $row_rsCaterLunch["PRODUCTID"]; ?>2">
Sign in to reply to this post

elewis93815

Thank you Jason! Issue solved! Have a wonderful day!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...