Mett Posted August 3, 2004 Posted August 3, 2004 Hello; I need to pass some values (checkboxes) from product_info to shopping_cart.php...here is my code from product_info.php: <table width="75%" border="0" align="center" bgcolor="#CCCCCC"> <tr> <? $period_product_query = tep_db_query("select * from " . TABLE_PRODUCTS_TO_STORES . " where stores_id = '1' and products_id= '". $products_id."'"); while($period_product = tep_db_fetch_array($period_product_query)){ ?> <td align="center" class="main" colspan="8"><?php echo (TEXT_BUY_PERIOD); ?></td> </tr> <tr> <td align="left" class="main" > <? if ($period_product['luni'] == 1) { echo tep_draw_checkbox_field('luni[]', '1', false) . ' ' . TEXT_INFO_LUNI; }?> </td> <td align="left" class="main" ><? if ($period_product['marti'] == 2) { echo tep_draw_checkbox_field('marti[]', '2', false) . ' ' . TEXT_INFO_MARTI; }?></td> <td align="left" class="main" ><? if ($period_product['miercuri'] == 3) { echo tep_draw_checkbox_field('miercuri[]', '3', false) . ' ' . TEXT_INFO_MIERCURI; }?></td> <td align="left" class="main" ><? if ($period_product['joi'] == 4) { echo tep_draw_checkbox_field('joi[]', '4', false) . ' ' . TEXT_INFO_JOI; }?></td> <td align="left" class="main" ><? if ($period_product['vineri'] == 5) { echo tep_draw_checkbox_field('vineri[]', '5', false) . ' ' . TEXT_INFO_VINERI; }?></td> <td align="left" class="main" ><? if ($period_product['sambata'] == 6) { echo tep_draw_checkbox_field('sambata[]', '6', false) . ' ' . TEXT_INFO_SAMBATA; }?></td> </tr> <tr> <td align="left" class="main" ><? if ($period_product['duminica'] == 7) { echo tep_draw_checkbox_field('duminica[]', '7', false) . ' ' . TEXT_INFO_DUMINICA; }?></td> <td align="left" class="main" ><? if ($period_product['perioada_01_07'] == 8) { echo tep_draw_checkbox_field('perioada_01_07[]', '8', false) . ' ' . TEXT_INFO_PERIOADA_01_07; }?></td> <td align="left" class="main" ><? if ($period_product['perioada_08_15'] == 9) { echo tep_draw_checkbox_field('perioada_08_15[]', '9', false) . ' ' . TEXT_INFO_PERIOADA_08_15; }?></td> <td align="left" class="main" ><? if ($period_product['perioada_01_15'] == 10) { echo tep_draw_checkbox_field('perioada_01_15[]', '10', false) . ' ' . TEXT_INFO_PERIOADA_01_15; }?></td> <td align="left" class="main" ><? if ($period_product['perioada_16_31'] == 11) { echo tep_draw_checkbox_field('perioada_16_31[]', '11', false) . ' ' . TEXT_INFO_PERIOADA_16_31 ; }?></td> <td align="left" class="main" ><? if ($period_product['luna_curenta'] == 12) { echo tep_draw_checkbox_field('luna_curenta[]', '12', false) . ' ' . TEXT_INFO_LUNA_CURENTA; }?></td> <? } ?> </tr> </table> What is suppose to do? When user check one ore more checkboxes (periods) data should go to shopping_cart.php as: text ("You select day(s): (day one) and/or (day two etc) and input_hidden field (with checkbox values inside).All data will be added to database in normal way: checkout_shipping->checkout_payment etc. Since now, i can't get checked datas in shopping_cart.. :( P.S: don't know if necesary to say but luni mean monday etc, perioda mean period, luna_curenta mean current_month in my language :) Thanks Mett Carpe Diem
Mett Posted August 4, 2004 Author Posted August 4, 2004 Nobody? Let me be more specific: what I want to do it's an recurrence subscription contribution: when user see details for one product in bottom of product_info.php will appear a form with few checkboxes (values: daily, weekly, fortnightly and monthly) and one drop down menu with deliver hours for each checkbox value. What it's suppose to do: User check their options -> checked values are shown in shopping_cart.php and pass to next files till are submited into database. In Admin a report page will show me which products must be delivered daily (eg:every Monday, every week from current month and so on) and at what hours... Problem: how i get checked data(s) from product_info.php and show it in shopping_cart.php and pass it to next files? I try to do that in many ways but it's over my brain capacity..nothing work.. Please......HELP!!!!!!!!!!!!!!!!!!!!! :( Carpe Diem
♥yesudo Posted August 4, 2004 Posted August 4, 2004 look at each of the files in the checkout process - follow one value through - like product name then duplicate for one of your values. db committing is done in checkout_process.php. or maybe add the dates as attributes rather than trying to reinvent the wheel. Your online success is Paramount.
Mett Posted August 5, 2004 Author Posted August 5, 2004 Certain thing..I'm silly :blink: ...could you give me some examples? LEt's say i want to pass checkbox "monday" (with value= 1) and drop_down_menu "hour" (with selected value=08) to shopping_cart..how it's supposed to be the script in product_info and in shopping_cart? Carpe Diem
♥yesudo Posted August 5, 2004 Posted August 5, 2004 or maybe add the dates as attributes rather than trying to reinvent the wheel. did this not appeal ? Your online success is Paramount.
Mett Posted August 5, 2004 Author Posted August 5, 2004 Unfortunately, no..ok, let's try soemthing else: there is any contribution which might help me or bring me closer to what i want? Or better, could you provide me some examples? Maybe i'm doing something wrong... Carpe Diem
Recommended Posts
Archived
This topic is now archived and is closed to further replies.