Jump to content

Adding Options A Little Bit Easier


Guest

Recommended Posts

Guest twisted

I have had this happen, where with the ocassional product, you click the link and nothing happens.

My "fix" isn't really a fix, as such...more like a friggin annoynace, but it does work.

It seems that the problem may have something to do with browser caching.

What I have to do, is close my browser completely, and log back in in a fresh browser window. Then the link works.

I know...its hardly a solution...but better than nothing.

:P

Link to comment
Share on other sites

  • 1 month later...

I've been using this mod for a while and REALLY like it.

I really need to ad another set of Product Option / Name Option / Value

Thanks in advance for any help.

Link to comment
Share on other sites

Here is what I've managed to do on my own.

The fields look like the are lined up except the submit button.

I also know I have to edit/fix some SQL commands.

If ANYONE can help, I'd really appreciate it.

Some products, I need more than two fields.

This is my product_op.php page.

THANKS!

;)

<?

session_start();



// if session is not registered redirect to login

if (!session_is_registered("admin"))

  {

    header("Location: login.php"); 

  }

// if session is registered continue

if(session_is_registered("admin")){

include("config.php");

include( "settings.inc.php");

include( "function.inc.php");

$h=h+6;

$today = date("D M dS, Y $h:i a");

?>

<html>

<head>

<title>Product Options</title>

<style type="text/css">

	<!--

  @import url(<?echo"$site_url";?>/admin/style.css);

	-->

</style>

<script type="text/javascript">

function load()

{

window.status = "Product Options"

}

</script>

<?

   echo "<script language=\"JavaScript\" type=\"text/JavaScript\">

  function MM_openBrWindow(theURL,winName,features) 

  	{

   window.open(theURL,winName,features);

  	}

  function decision(message, url){

  if(confirm(message)) location.href = url;

  }

       </script>";

  ?>

</head>

<body bgcolor='#ffffff' onload="load()">

<center>

<?

echo"<center><a href=\"javascript:window.close()\"><img src=\"images/close.jpg\" border=\"0\"><br>Close This Window</a></center>";

sb2($title,$colour_1,$bg_colour);

  echo"<center>

  <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"1\">

    <tr>

      <td width=\"79%\" height=\"35\"><img src=\"images/product_op.gif\"></td>

      <td width=\"22%\" height=\"35\"><a href=\"http://www.allcymbals.com/store/admin/view_product.php?product=$product\" target=\"_blank\" title=\"View Product\"><img src=\"images/viewproduct.jpg\" border=\"0\"><br>View Product</a></td>

    </tr>

    <tr>

      <td width=\"100%\" height=\"1\" colspan=\"3\">Option For Product Number: $product<br>~$title~</td>

    </tr>

    <tr>

      <td width=\"100%\" height=\"1\" colspan=\"3\"><hr></td>

    </tr>

  </table>

  </center>";

//start options

  echo"<form method=\"post\" name=\"attributes\" action=\"product_op.php?task=assign\">";

             if($del==1){

        $query2 = "DELETE FROM ".$prefix."store_options_bot where assign_id=$assign_id"; 

        $result2 = mysql_query($query2);

  echo"<center><font color=\"cc0000\"><b>Option Deleted</b></font></center>";}

  

  if($task=="assign"){

if($edit_option){

        $query = "UPDATE ".$prefix."store_options_bot set product='$product', option_id='$option_id', value_id='$value_id', option_price='$option_price', option_symbol='$option_symbol' where assign_id='$assign_id'"; 

        if((!empty($product))&&(!empty($option_id))&&(!empty($value_id))&&(!empty($option_price))&&(!empty($option_symbol))){

        $result = mysql_query($query) or die("Error: " . mysql_error());

  echo"<center><font color=\"cc0000\"><b>Option Updated Successfully</b></font></center>";}

        else{

        echo"<center><font color=\"cc0000\"><b>Make Sure All Options Are Selected</b></font></center>";}

        }



  if($add_assign){

  $last_option = $option_id;



        

        $query = "INSERT INTO ".$prefix."store_options_bot set product='$product', option_id='$option_id', value_id='$value_id', option_price='$option_price', option_symbol='$option_symbol'"; 

        if((!empty($product))&&(!empty($option_id))&&(!empty($value_id))&&(!empty($option_price))&&(!empty($option_symbol))){

        $result = mysql_query($query) or die("Error: " . mysql_error());}

        else{

        echo"<center><font color=\"cc0000\"><b>Make Sure All Options Are Selected</b></font></center>";}

        }// end add assign

}

  

  

  ?>

 

  <center>

  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="1">

    <tr>

      <td width="21%" height="1">

      <p align="center"><b><font size="2">Option Name</font></b></td>

      <td width="23%" height="1">

      <p align="center"><b><font size="2">Value</font></b></td>

     <td width="21%" height="1">

      <p align="center"><b><font size="2">Option Name</font></b></td>

      <td width="23%" height="1">

      <p align="center"><b><font size="2">Value</font></b></td>

      <td width="19%" height="1">



      <p align="center"><b><font size="2">Price</font></b></td>

      <td width="17%" height="1">

      <p align="center"><b><font size="2">Add/Minus</font></b></td>

      <td width="15%" height="1">

      <p align="center"><b><font size="2">Edit/Delete</font></b></td>

      <td width="15%" height="1"></td>

    </tr>

    <tr>

	<?

  $query6 = "SELECT * FROM ".$prefix."store_options_bot WHERE product='$product'"; 

        $result6 = mysql_query($query6) or die("Error: " . mysql_error()); 

        $count_result6 = mysql_num_rows($result6);

  while($row6 = mysql_fetch_array($result6)){



                        $op_id = $row6["option_id"];

                        $va_id = $row6["value_id"];

                        $price = $row6["option_price"];

                        $symbol = $row6["option_symbol"];}

                            	

      if ($edit_option==1){

                        $query5 = "select * from ".$prefix."store_options_bot where assign_id = '$assign_id'"; 

                        $result5 = mysql_query($query5)or die("Error: " . mysql_error()); 

                        while ($row5 = mysql_fetch_array($result5)){

                        $opi_id = $row5["option_id"];

                        $vai_id = $row5["value_id"];

                        $pricei = $row5["option_price"];}}



                        // get value name :)

                        $query4 = "select * from ".$prefix."store_options_mid where value_id = '$value_id'";

                        $result4 = mysql_query($query4)or die("Error: " . mysql_error());

                        while ($row4 = mysql_fetch_array($result4)){

                        $value_name=$row4["value_name"];}

                        echo"<td align=\"center\" bgcolor=\"$colour_3\">

                        <select name=\"option_id\">

                        <option value=\"\">$la_please_choose</option>";

                        // build drop down list of options :-)

                        $query = "select * from ".$prefix."store_options_top";

                        $result = mysql_query($query)or die("Error: " . mysql_error());

                                 while($row = mysql_fetch_array($result)){

                                        $option_id=$row["option_id"];

                                        echo"<option value=\"$option_id\" ";if ($add_assign){if ($option_id==$last_option){echo "selected";}}if ($edit_option==1){if($option_id==$opi_id){echo "selected";}}echo">$option_name</option>";

                                        }

                        // get value name :)

                        $query4 = "select * from ".$prefix."store_options_mid where value_id = '$value_id'";

                        $result4 = mysql_query($query4)or die("Error: " . mysql_error());

                        while ($row4 = mysql_fetch_array($result4)){

                        $value_name=$row4["value_name"];}

                        echo"<td align=\"center\" bgcolor=\"$colour_3\">

                        <select name=\"option_id\">

                        <option value=\"\">$la_please_choose</option>";

                        // build drop down list of options :-)

                        $query = "select * from ".$prefix."store_options_top";

                        $result = mysql_query($query)or die("Error: " . mysql_error());

                                 while($row = mysql_fetch_array($result)){

                                        $option_id=$row["option_id"];

                                        echo"<option value=\"$option_id\" ";if ($add_assign){if ($option_id==$last_option){echo "selected";}}if ($edit_option==1){if($option_id==$opi_id){echo "selected";}}echo">$option_name</option>";

                                        }

                        // get value name :)

                        $query4 = "select * from ".$prefix."store_options_mid where value_id = '$value_id'";

                        $result4 = mysql_query($query4)or die("Error: " . mysql_error());

                        while ($row4 = mysql_fetch_array($result4)){

                        $value_name=$row4["value_name"];}

                        echo"<td align=\"center\" bgcolor=\"$colour_3\">

                        <select name=\"option_id\">

                        <option value=\"\">$la_please_choose</option>";

                        // build drop down list of options :-)

                        $query = "select * from ".$prefix."store_options_top";

                        $result = mysql_query($query)or die("Error: " . mysql_error());

                                 while($row = mysql_fetch_array($result)){

                                        $option_id=$row["option_id"];

                                        echo"<option value=\"$option_id\" ";if ($add_assign){if ($option_id==$last_option){echo "selected";}}if ($edit_option==1){if($option_id==$opi_id){echo "selected";}}echo">$option_name</option>";

                                        }

                 echo"</select></td>

                        <td align=\"center\" bgcolor=\"$colour_3\">

                        <select name=\"value_id\">

                        <option value=\"\">$la_please_choose</option>";

                 // build drop down list of values :-)

                        $query = "select * from ".$prefix."store_options_mid"; 

                        $result = mysql_query($query)or die("Error: " . mysql_error()); 

                                 while($row = mysql_fetch_array($result)){ 

                                        $value_id=$row["value_id"]; 

                                        $value_name= $row["value_name"];

          echo"<option value=\"$value_id\" ";if ($edit_option==1){if($value_id==$vai_id){echo "selected";}}echo">$value_name</option>";

                                        }

                 echo"</select></td>

                 <td align=\"center\" bgcolor=\"$colour_3\">$currency&nbsp;<input type=\"text\" class=\"textbox\" size=\"5\" name=\"option_price\""; if ($edit_option==1){echo"value=\"$pricei\"";}else{echo"value=\"0.00\"";}echo"></td>

                 <td align=\"center\" bgcolor=\"$colour_3\">

                        <select name=\"option_symbol\">

                                <option value=\"=\">=</option>

                                <option value=\"-\">-</option>

                                <option value=\"+\" selected>+</option>

                     </select></td>

           <input type=\"hidden\" name=\"product\" value=\"$product\">

       <input type=\"hidden\" name=\"title\" value=\"$title\">

   <td align=\"center\" bgcolor=\"$bgcolour\">";

   if ($edit_option==1){

  

   echo" <input type=\"hidden\" name=\"assign_id\" value=\"$assign_id\"><input type=\"submit\" class=\"submit\" name=\"edit_option\" value=\"Edit Option\">";

   }else{   

   echo"<input type=\"submit\" class=\"submit\" name=\"add_assign\" value=\"$la_add_ass\"></td>";}



 

      

  $query3 = "SELECT * FROM ".$prefix."store_options_bot WHERE product='$product'"; 

        $result3 = mysql_query($query3) or die("Error: " . mysql_error()); 

        $count_result3 = mysql_num_rows($result3);

  while($row3 = mysql_fetch_array($result3)){



                        $assign_id = $row3["assign_id"];

                        $option_id = $row3["option_id"];

                        $value_id = $row3["value_id"];

                        $option_id = $row3["option_id"];

                        $value_id = $row3["value_id"];



                        $option_price = $row3["option_price"];

                        $option_symbol = $row3["option_symbol"];

                        $product = $row3["product"];    	

                              // get option name :)

                        $query2 = "select * from ".$prefix."store_options_top where option_id = '$option_id'"; 

                        $result2 = mysql_query($query2)or die("Error: " . mysql_error()); 

                        while ($row2 = mysql_fetch_array($result2)){

                        $option_name=$row2["option_name"];}



                        // get value name :)

                        $query1 = "select * from ".$prefix."store_options_mid where value_id = '$value_id'"; 

                        $result1 = mysql_query($query1)or die("Error: " . mysql_error()); 

                        while ($row1 = mysql_fetch_array($result1)){

                        $value_name=$row1["value_name"];} 

                              echo"<tr bgcolor=\"$colour_3\"> 

                                        <td height=\"20\" align=\"center\">$option_name</td>

                                        <td height=\"20\" align=\"center\">$value_name</td>

                                        <td height=\"20\" align=\"center\">$option_name</td>

                                        <td height=\"20\" align=\"center\">$value_name</td>

                                        <td height=\"20\" align=\"center\">$option_price</td>

                                        <td height=\"20\" align=\"center\">$option_symbol</td>

                                 

                                        <td align=\"center\"><a href=\"product_op.php?edit_option=1&assign_id=$assign_id&product=$product&title=$title\" target=\"_self\">$la_edit</a>&nbsp;/&nbsp;<a href=\"javascript:decision('$la_ass_del_check',

'product_op.php?del=1&assign_id=$assign_id&product=$product&title=$title')\" target=\"_self\"><font color=\"green\">$la_inv_del</font></a></td>

                                </tr>";

                        }//end while

        

        echo"</tr>  </table>

  </center>";

eb2($bg_colour,$colour_1);}?>

</center>

</body>

</html>

Link to comment
Share on other sites

Guest Allansamson

Wildbill, you are my hero!

I have a shop with tons of product, but still have to add all the options.

With this very usefull mod it saves me so much time.

Keep-on-modding!!

Allan

Link to comment
Share on other sites

  • 2 weeks later...
Guest carvalho

Great MOD, working.

There only a problem in product_op.php , the link to visualize it's wrong, who download the file must change.

Can this be altered to select multiple options at a time, because if we have 10 opções we still have to make one by one.

But a great great MOD.

Link to comment
Share on other sites

Great MOD, working.

There only a problem in product_op.php , the link to visualize it's wrong, who download the file must change.

Can this be altered to select multiple options at a time, because if we have 10 opções we still have to make one by one.

But a great great MOD.

YES! Open product_op.php in your favorite editor.

Go to line 52 and change that to match the url for your store's admin directory.

Link to comment
Share on other sites

Like above with carvalo I have a shop with more options than products is there a way to add options or values to a product all at once ?

but indeed still a great mod

hove

Link to comment
Share on other sites

Like above with carvalo I have a shop with more options than products is there a way to add options or values to a product all at once ?

but indeed still a great mod

hove

I've been beating this one into the ground too without luck!

Link to comment
Share on other sites

cool this mod works looks sound

one problem tho whenu click view product it goes to a diffent website how do i change this?

Link to comment
Share on other sites

Guest jbdancer

Open product_op

find :

<td width=\"79%\" height=\"35\"><img src=\"images/product_op.gif\"></td>



      <td width=\"22%\" height=\"35\"><a href=

Change the url after a href to yours :o

Link to comment
Share on other sites

  • 3 weeks later...
Guest supernix

Just my humble opinion. But I think it would have been better to use a check box setup to select options so that the user could just go down the list and check all the options at once time then hit submit.

Talk about setting the options at one time.

Link to comment
Share on other sites

Guest mahcus

Anybody know anything about qdpie's "group otions" mod?

Under action in the Group Option section i get this as an action...

'tshirtun_ccrt1.cubecartstore_group_options_bot' doesn't exist

??

Link to comment
Share on other sites

Doesanybody know what happened to WildBill?

He doesn't even answer mail from his website.

It would be a shame to loose his support.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
Guest lnp

Is it just me or is the MOD gone? When I click on WildBil's link "Easy Options" I get page cannot be displayed. Can someone please send me the file or repost it. Thank You

Link to comment
Share on other sites

  • 2 weeks later...
Guest rockreation

Very interested in this MOD. Can anyone let me know where to get a working updated download of this. I emailed wildbill a week ago and no reply. thanks

Link to comment
Share on other sites

Guest jones_20_99

hi Guys

the mod works but .. i have problem adding option...

how can I do that... is there any place where i should put my option name and values

cause the windows that open u can not add or change anything in it ...

any body knows how????

regards jones

Link to comment
Share on other sites

Go into admin / product / options and start creating all the options that you need.

When you decide to add a product that has "options" just click on the "add options" link and you will see your popup window where you can add the options that you need for that product!

MiniMe

Link to comment
Share on other sites

Guest jones_20_99

hi Minime

Go into admin / product / options and start creating all the options that you need.

In my admin i can add and change pruduct.. i donr have a place where i can put option.

does it come automaticly after you install the mod..

or i should do something to make it apear in the admin section..

or u mean i should add options in the code??

thanks jones

Link to comment
Share on other sites




×
×
  • Create New...