Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

abdelatif

Pioneers
  • Posts

    15
  • Joined

  • Last visited

abdelatif's Achievements

  1. I see a lot of [color=#282828][font=helvetica, arial, sans-serif] In all the code above, this has something to do with this board, the <> code function has done that. Offcourse this has nothing to do with the code of the module. But I cannot edit my own post anymore :(
  2. I have installed this great contribution, but what a pity it is, to see that so much code is missing in the latest version of giftwrap 3.03 en 3.04 Out of the box 3.04 is not working, to much code missing? I finaly managed to merge the installation instructions from the 3.00 version and the 3.04 version because I really wanted this contrib. And got it working. The files effected are mainly catalog/checkout_shipping and catalog/checkout_confirmation. I will put both of the edited files here, for interested ones. I am not sure I missed something, but at least it is working for me as it is. I also want more than one product at display, like wrappingpaper or gift box etc, so I changed the code of JangoF post #115 on page 6 ============================ (here his information) Copy-paste includes\modules\giftwrap\giftwrap.php and name it gift2.php Make changes: class giftwrap -> class gift2 function giftwrap -> function gift2 $this->code = 'giftwrap'; -> $this->code = 'gift2'; Search and replace (Match Case) GIFT_ with GIFT2_ (17 occurences) and Copy-paste includes\languages\english\modules\giftwrap\giftwrap.php and name it gift2.php Make changes: Search and replace (Match Case) GIFT_ with GIFT2_ (3 occurences) ============================== THe thing now is, that the messagefield of the second module doesn't hide, it is always visible. Also only one instance of the module got counted in the total of the order so only wrapping paper or only gift box, also if both are selected. What am I missing anyone?? Here the files I changed version 3.00 and 3.04 in catalog/checkout_shipping in order of the instruction files I changed You need the original instructions with it to know where the code has to be inserted. // load all enabled shipping modules require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; ***ADD BEFORE:----> Add this just BEFORE it <---- //BOF osc_Giftwrap // load giftwrap module require(DIR_WS_CLASSES . 'gift.php'); $giftwrap_modules = new gift;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]// process the selected giftwrap method if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) { if (!tep_session_is_registered('giftwrap_info')) tep_session_register('giftwrap_info'); //if (!tep_session_is_registered('giftwrap')) tep_session_register('giftwrap'); //tep_session_unregister('giftwrap'); if (!tep_session_is_registered('giftwrap_message')) tep_session_register('giftwrap_message'); if (!tep_session_is_registered('giftwrap_card')) tep_session_register('giftwrap_card');[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if (tep_count_giftwrap_modules() > 0) { //at least 1 giftwrap module is loaded //see if a giftwrap method was selected if ( (isset($HTTP_POST_VARS['giftwrap'])) && (strpos($HTTP_POST_VARS['giftwrap'], '_')) ) { $giftwrap_infoA = $HTTP_POST_VARS['giftwrap']; list($module, $method) = explode('_', $giftwrap_infoA); if (is_object($$module)) { $quote1 = $giftwrap_modules->quote1($method, $module); if (isset($quote1['error'])) { tep_session_unregister('$giftwrap_info'); } else { if ( (isset($quote1[0]['methods'][0]['title'])) && (isset($quote1[0]['methods'][0]['cost'])) ) { /*$giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . ' (' . $quote1[0]['methods'][0]['title'] . ')', 'cost' => $quote1[0]['methods'][0]['cost']);*/ $giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . $quote1[0]['methods'][0]['title'], 'cost' => $quote1[0]['methods'][0]['cost']); } }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] } else { tep_session_unregister('giftwrap_info'); } }else{ tep_session_unregister('giftwrap_info'); }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] //determine whether of not giftcard was selected if(isset($HTTP_POST_VARS['giftwrap_card']) && $HTTP_POST_VARS['giftwrap_card']){ //giftcard Checked $giftwrap_card = $HTTP_POST_VARS['giftwrap_card']; }else { //giftcard unchecked tep_session_unregister('giftwrap_card'); }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] // add gift message if (tep_not_null($HTTP_POST_VARS['giftMessage']) && tep_session_is_registered('giftwrap_info') && isset($HTTP_POST_VARS['giftwrap_card'])) { if (!tep_session_is_registered('giftwrap_message')) tep_session_register('giftwrap_message'); $giftwrap_message = tep_db_prepare_input($HTTP_POST_VARS['giftMessage']); }else{ tep_session_unregister('giftwrap_message'); } } else { // no Giftwrap modules enabled/installed $giftwrap_info = false; } }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]// get all available giftwrap quotes $quotes1 = $giftwrap_modules->quote1(); //EOF osc_Giftwrap ======================================================================================= <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> ======================================================================================= //BOF osc_Giftwrap function selectRowEffectGift(object, buttonSelect) { if (!selectedgift) { if (document.getElementById) { selectedgift = document.getElementById('defaultSelectedGift'); } else { selectedgift = document.all['defaultSelectedGift']; } } if (selectedgift) selectedgift.className = 'moduleRow'; object.className = 'moduleRowSelected'; selectedgift = object; // one button is not an array if (document.checkout_address.giftwrap[0]) { document.checkout_address.giftwrap[buttonSelect].checked=true; } else { document.checkout_address.giftwrap.checked=true; } } function rowOverEffectGift(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffectGift(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } $(document).ready(function(){ $('#giftwrapcard_heading').css('display','none'); $('#giftwrapcard_box').css('display','none'); $('#giftwrap_message_title').css('display','none'); $('#giftwrap_message_field').css('display','none'); if($('input[name=giftwrap]').is(':checked')){ //show card message $("#giftwrapcard_heading").show("fast"); $("#giftwrapcard_box").show("fast"); } if($('input[name=giftwrap_card]').is(':checked')){ $("#giftwrap_message_title").show("fast"); $("#giftwrap_message_field").show("fast"); } // Add onclick handler to checkbox w/id checkme $("input[name=giftwrap]").click(function(){ // If checked if ($("input[name=giftwrap]").is(":checked")){ //show the hidden div $("#giftwrapcard_heading").show("fast"); $("#giftwrapcard_box").show("fast"); }else{ //otherwise, hide it $("#giftwrapcard_heading").hide("fast"); $("#giftwrapcard_box").hide("fast"); $("#giftwrap_message_title").hide("fast"); $("#giftwrap_message_field").hide("fast"); //uncheck giftwrapcard_box if($('input[name=giftwrap_card]').is(':checked')){ $('input[name=giftwrap_card]').attr('checked', false); } } }); $("#giftwrap_card_checkbox").click(function(){ // If checked if ($("#giftwrap_card_checkbox").is(":checked")){ //show the hidden div $("#giftwrap_message_title").show("fast"); $("#giftwrap_message_field").show("fast"); }else{ //otherwise, hide it $("#giftwrap_message_title").hide("fast"); $("#giftwrap_message_field").hide("fast"); } }); }); //EOF osc_Giftwrap ======================================================================================= [/font][/color] <!--BOF osc_Giftwrap --> <?php if (tep_count_giftwrap_modules() > 0) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_GIFTWRAP_METHOD; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $quotes1_size = sizeof($quotes1); //number of GW modules loaded /* if ($quotes1_size > 1) { */ if ($quotes1_size > 0) { //at least one gw module is loaded ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td span class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_GIFTWRAP_METHOD; ?></td> <td class="main" width="50%" valign="top" align="right"><?php //echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.png'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> <?php $radio_buttons = 0; for ($i=0; $i<$quotes1_size; $i++) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (isset($quotes1[$i]['error'])) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" colspan="3"><?php echo $quotes1[$i]['error']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen if($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']){ $checked = (true); }else{ $checked = (false); } if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) { echo '<tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo '<tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="75%"><?php echo $quotes1[$i]['methods'][$j]['title']; ?></td> <?php if ( ($quotes1_size > 0) || ($n2 > 0) ) { if (DISPLAY_PRICE_WITH_TAX == 'true') { $gift_tax_rate_tmp = tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS); $gift_tax_amt_tmp = $quotes1[$i]['methods'][$j]['cost']; $gift_tax_amt_tmp += tep_calculate_tax($quotes1[$i]['methods'][$j]['cost'], $gift_tax_rate_tmp); ?> <td class="main"><?php echo $currencies->format($gift_tax_amt_tmp); ?></td> <?php } else { // display price without tax ?> <td class="main"><?php echo $currencies->format($quotes1[$i]['methods'][$j]['cost']); ?></td> <?php } ?> <td class="main" align="right"><?php echo tep_draw_checkbox_field('giftwrap', $quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'], $checked); ?></td> <?php } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!-- Add giftcard radio buttons --> <?php //should card button be checked? // there is a message and it is not null OR if the button is checked if (tep_session_is_registered('giftwrap_card') && tep_not_null('giftwrap_card')) { $giftCard_checked=TRUE; }else{ $giftCard_checked=FALSE; } ?> <tr id="giftwrapcard_heading"> <td span class="main" width="50%" valign="top" id="giftwrap_card_title"><?php echo TEXT_CHOOSE_GIFTWRAP_CARD; ?></td> </tr> <?php //echo '<tr id="giftwrapcard_box" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, 0)">' . "\n"; ?> <tr id="giftwrapcard_box"> <td class="main"><?php echo TEXT_GIFTWRAP_CARD; ?></td> <td class="main" align="right"> <?php echo tep_draw_checkbox_field('giftwrap_card', TRUE, $giftCard_checked, 'id="giftwrap_card_checkbox"'); ?> </td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!--add message field--> <tr> <td colspan="5" class="main" id="giftwrap_message_title"><b><?php echo 'Persoonlijk bericht op kaart'; ?></b></td> </tr> <tr> <td colspan="5" id="giftwrap_message_field"><?php echo tep_draw_textarea_field('giftMessage', 'soft', '60', '5', $giftwrap_message); ?></td> </tr> <?php $radio_buttons++; } } ?> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> <?php } ?> <!--EOF osc_Giftwrap--> in catalog/checkout_confirmation in order of the instruction files I changed. /BOF osc_Giftwrap // load the selcted giftwrap module //require(DIR_WS_CLASSES . "gift.php"); //$giftwrap_modules = new gift($giftwrap); //EOF osc_Giftwrap =============================================================== <!-- BOF osc_Giftwrap --> <?php if ($order->info['giftwrap_method']) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr>[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] <tr> <td class="main"><b><?php echo HEADING_GIFTWRAP_METHOD; ?></b></td> </tr> <tr> <td class="main"><?php echo $order->info['giftwrap_method']; ?></td> </tr> <tr> <td class="main"><b><?php echo 'Bericht op kaart'; ?></b></td> </tr> <tr> <td class="main"><?php echo $giftwrap_message; ?></td> </tr> <?php } ?> <!-- EOF osc_Giftwrap --> Hope this wil help someone else having trouble with the version 3.04 Also if someone has a solution on the multiple gifts as above that would be greatly appreciated.
  3. I am using the contribution Sales Report Between Two Dates. You can find the contribution here On a Oscommerce Rc2a shop, the contrib works like a charm, but I would like to add the customers name to the report Unfortunately no luck eversince. I think it should be add in the file: catalog/admin/stats_sales.php Any-one?? <?php /* Sales Report Between Two Dates originally posted by Dhiman Pawan 7/15/2006 URL: www.oscommerce.com/community/contributions,4389 Updated by Lemon Yellow 9/13/2006 Further Updates: 2009-Sep-21 Monty Wilson -- corrected error where sales on the last day of specified date range were not listed unless sale was made in first second of the day. Also corrected error where the "sort by day" and "sort by model" links were broken. Changed message from "this month" to "specified time period," because the date range isn't necessarily a month. Installed a feature where the product model numbers are now links which when clicked will open the regular catalog page so the person reviewing the reports can see further product details such as categories. Changed message from "Product + Code Number" to "Product Model Number" since output shown to the user in this case is sorted by model. Changed format of table so totals are aligned under the net and gross columns. Changed table title from date of first sale to "Products Sold In Specified Time Period" in the sort-by-model case. Installed program header. Installed feature of excluding a status rather than showing a status. 2009-Oct-01 Monty Wilson -- in the "by date" option, added order subtotal, order grand total, and number of orders for the stated period. Known issues: The program is written with a languages-English include file, indicating that it could be internationalized; however, much of the content displayed to the user is hardcoded English. The program allows entry of illegal dates; for example, 29 February in non-leap years, or 31 April. The years allowed to be specified are 2004~2011. */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); if ($HTTP_GET_VARS['month'] == '') { $day1='1'; $month = date("m")-1; $year = '20' . date("y"); $date1=$year."-".$month."-"."$day1"; $day22 = '1'; $month22 = date("m"); $year22 = '20'.date("y"); $date2=$year22."-".$month22."-".$day22; //echo $date1."<br>"; //echo $date2; } else { $day1 = $HTTP_GET_VARS['day']; $month = $HTTP_GET_VARS['month']; $year = $HTTP_GET_VARS['year']; $date1=$year."-".$month."-"."$day1"; $day22 = $HTTP_GET_VARS['day2']; $month22 = $HTTP_GET_VARS['month2']; $year22 = $HTTP_GET_VARS['year2']; $date2=$year22."-".$month22."-"."$day22"; //echo $date1."<br>"; //echo $date2; } $day = array(); $day[] = array('id' => 1, 'text' => '1'); $day[] = array('id' => 2, 'text' => '2'); $day[] = array('id' => 3, 'text' => '3'); $day[] = array('id' => 4, 'text' => '4'); $day[] = array('id' => 5, 'text' => '5'); $day[] = array('id' => 6, 'text' => '6'); $day[] = array('id' => 7, 'text' => '7'); $day[] = array('id' => 8, 'text' => '8'); $day[] = array('id' => 9, 'text' => '9'); $day[] = array('id' => 10, 'text' => '10'); $day[] = array('id' => 11, 'text' => '11'); $day[] = array('id' => 12, 'text' => '12'); $day[] = array('id' => 13, 'text' => '13'); $day[] = array('id' => 14, 'text' => '14'); $day[] = array('id' => 15, 'text' => '15'); $day[] = array('id' => 16, 'text' => '16'); $day[] = array('id' => 17, 'text' => '17'); $day[] = array('id' => 18, 'text' => '18'); $day[] = array('id' => 19, 'text' => '19'); $day[] = array('id' => 20, 'text' => '20'); $day[] = array('id' => 21, 'text' => '21'); $day[] = array('id' => 22, 'text' => '22'); $day[] = array('id' => 23, 'text' => '23'); $day[] = array('id' => 24, 'text' => '24'); $day[] = array('id' => 25, 'text' => '25'); $day[] = array('id' => 26, 'text' => '26'); $day[] = array('id' => 27, 'text' => '27'); $day[] = array('id' => 28, 'text' => '28'); $day[] = array('id' => 29, 'text' => '29'); $day[] = array('id' => 30, 'text' => '30'); $day[] = array('id' => 31, 'text' => '31'); $months = array(); $months[] = array('id' => 1, 'text' => 'January'); $months[] = array('id' => 2, 'text' => 'February'); $months[] = array('id' => 3, 'text' => 'March'); $months[] = array('id' => 4, 'text' => 'April'); $months[] = array('id' => 5, 'text' => 'May'); $months[] = array('id' => 6, 'text' => 'June'); $months[] = array('id' => 7, 'text' => 'July'); $months[] = array('id' => 8, 'text' => 'August'); $months[] = array('id' => 9, 'text' => 'September'); $months[] = array('id' => 10, 'text' => 'October'); $months[] = array('id' => 11, 'text' => 'November'); $months[] = array('id' => 12, 'text' => 'December'); $years = array(); $years[] = array('id' => 2004, 'text' => '2004'); $years[] = array('id' => 2005, 'text' => '2005'); $years[] = array('id' => 2006, 'text' => '2006'); $years[] = array('id' => 2007, 'text' => '2007'); $years[] = array('id' => 2008, 'text' => '2008'); $years[] = array('id' => 2009, 'text' => '2009'); $years[] = array('id' => 2010, 'text' => '2010'); $years[] = array('id' => 2011, 'text' => '2011'); $years[] = array('id' => 2012, 'text' => '2012'); $years[] = array('id' => 2013, 'text' => '2013'); $years[] = array('id' => 2014, 'text' => '2014'); $day2 = array(); $day2[] = array('id' => 1, 'text' => '1'); $day2[] = array('id' => 2, 'text' => '2'); $day2[] = array('id' => 3, 'text' => '3'); $day2[] = array('id' => 4, 'text' => '4'); $day2[] = array('id' => 5, 'text' => '5'); $day2[] = array('id' => 6, 'text' => '6'); $day2[] = array('id' => 7, 'text' => '7'); $day2[] = array('id' => 8, 'text' => '8'); $day2[] = array('id' => 9, 'text' => '9'); $day2[] = array('id' => 10, 'text' => '10'); $day2[] = array('id' => 11, 'text' => '11'); $day2[] = array('id' => 12, 'text' => '12'); $day2[] = array('id' => 13, 'text' => '13'); $day2[] = array('id' => 14, 'text' => '14'); $day2[] = array('id' => 15, 'text' => '15'); $day2[] = array('id' => 16, 'text' => '16'); $day2[] = array('id' => 17, 'text' => '17'); $day2[] = array('id' => 18, 'text' => '18'); $day2[] = array('id' => 19, 'text' => '19'); $day2[] = array('id' => 20, 'text' => '20'); $day2[] = array('id' => 21, 'text' => '21'); $day2[] = array('id' => 22, 'text' => '22'); $day2[] = array('id' => 23, 'text' => '23'); $day2[] = array('id' => 24, 'text' => '24'); $day2[] = array('id' => 25, 'text' => '25'); $day2[] = array('id' => 26, 'text' => '26'); $day2[] = array('id' => 27, 'text' => '27'); $day2[] = array('id' => 28, 'text' => '28'); $day2[] = array('id' => 29, 'text' => '29'); $day2[] = array('id' => 30, 'text' => '30'); $day2[] = array('id' => 31, 'text' => '31'); $months2 = array(); $months2[] = array('id' => 1, 'text' => 'January'); $months2[] = array('id' => 2, 'text' => 'February'); $months2[] = array('id' => 3, 'text' => 'March'); $months2[] = array('id' => 4, 'text' => 'April'); $months2[] = array('id' => 5, 'text' => 'May'); $months2[] = array('id' => 6, 'text' => 'June'); $months2[] = array('id' => 7, 'text' => 'July'); $months2[] = array('id' => 8, 'text' => 'August'); $months2[] = array('id' => 9, 'text' => 'September'); $months2[] = array('id' => 10, 'text' => 'October'); $months2[] = array('id' => 11, 'text' => 'November'); $months2[] = array('id' => 12, 'text' => 'December'); $years2 = array(); $years2[] = array('id' => 2004, 'text' => '2004'); $years2[] = array('id' => 2005, 'text' => '2005'); $years2[] = array('id' => 2006, 'text' => '2006'); $years2[] = array('id' => 2007, 'text' => '2007'); $years2[] = array('id' => 2008, 'text' => '2008'); $years2[] = array('id' => 2009, 'text' => '2009'); $years2[] = array('id' => 2010, 'text' => '2010'); $years2[] = array('id' => 2011, 'text' => '2011'); $years2[] = array('id' => 2012, 'text' => '2012'); $years2[] = array('id' => 2013, 'text' => '2013'); $years2[] = array('id' => 2014, 'text' => '2014'); $status = (int)$HTTP_GET_VARS['status']; $statuses_query = tep_db_query("select * from orders_status where language_id = $languages_id order by orders_status_name"); $statuses = array(); $statuses[] = array('id' => 0, 'text' => 'Alle statussen'); while ($st = tep_db_fetch_array($statuses_query)) { $statuses[] = array('id' => $st['orders_status_id'], 'text' => 'Show ' . $st['orders_status_name']); $statuses[] = array('id' => $st['orders_status_id']*(-1), 'text' => 'Exclude ' . $st['orders_status_name']); } if ($status > 0) { $os = " and o.orders_status = " . $status . " "; } elseif ($status < 0) { $os = " and o.orders_status <> " . $status*(-1) . " "; } else { $os = ''; } if ($HTTP_GET_VARS['by']=='date') { $a="select sum(op.final_price*op.products_quantity) as daily_prod, sum(op.final_price*op.products_quantity*(1+op.products_tax/100)) as withtax, o.date_purchased, o.orders_id, op.products_name, op.products_id, sum(op.products_quantity) as qty, op.products_model from orders as o, orders_products as op where o.orders_id = op.orders_id and o.date_purchased between '".$date1."' and '".$date2." 23:59:59' $os GROUP by date_purchased,products_id"; //echo $a; $sales_products_query = tep_db_query($a); } else { $a="select sum(op.final_price*op.products_quantity) as daily_prod, sum(op.final_price*op.products_quantity*(1+op.products_tax/100)) as withtax, o.date_purchased, op.products_name, op.products_id, sum(op.products_quantity) as qty, op.products_model from orders as o, orders_products as op where o.orders_id = op.orders_id and o.date_purchased between '".$date1."' and '".$date2." 23:59:59' $os GROUP by products_id ORDER BY products_model"; //echo $a; $sales_products_query = tep_db_query($a); } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <form action="stats_sales.php" method=get> <tr> <td class="pageHeading" height="50"><?php echo HEADING_TITLE; ?></td> </tr> <tr> <td colspan="2"class="main" align="left"><b>Start Datum :</b> <?='Dag: ' . tep_draw_pull_down_menu('day', $day, $day1, 'onchange=\'this.form.submit();\'') . ' Maand: ' . tep_draw_pull_down_menu('month', $months, $month, 'onchange=\'this.form.submit();\'') . ' Jaar: ' . tep_draw_pull_down_menu('year', $years, $year, 'onchange=\'this.form.submit();\'')?><br><b>Eind Datum : </b> <?='Dag: ' . tep_draw_pull_down_menu('day2', $day2, $day22, 'onchange=\'this.form.submit();\'') . ' Maand: ' . tep_draw_pull_down_menu('month2', $months2, $month22, 'onchange=\'this.form.submit();\'') . ' Jaar: ' . tep_draw_pull_down_menu('year2', $years2, $year22, 'onchange=\'this.form.submit();\'')?> </td> </tr> <tr> <td class="main" align="left" height="40"><?='<b>Status : </b>' . tep_draw_pull_down_menu('status', $statuses, $status, 'onchange=\'this.form.submit();\'')?></td> </tr> <input type="hidden" name="by" value="<?=$HTTP_GET_VARS['by']?>"> </form> </table></td> </tr> <tr> <td class="main"><b>Sorteer op : </b><a href=<?php echo tep_href_link('../../..'.$PHP_SELF, tep_get_all_get_params(array('by')).'&by=date', 'SSL') ?>><u>Per dag uitgesplitst</u></a> <a href=<?php echo tep_href_link('../../..'.$PHP_SELF, tep_get_all_get_params(array('by')), 'SSL') ?>><u>Lijst weergave</u></a> <br><br><?echo "<b>Start datum : </b>".$date1."<br>"; echo "<b>Eind datum : </b>".$date2;?></td> </tr> <?php //echo $table_title if (tep_db_num_rows($sales_products_query) > 0) { $dp = ''; $total=0; // init products sales total $total_orders = 0; // init orders total $grand_total = 0; // init total of order sales amts $total_wtax=0; while ($sales_products = tep_db_fetch_array($sales_products_query)) { if (($HTTP_GET_VARS['by']=='date')) { $ddp = tep_date_short($sales_products['date_purchased']); $table_title = tep_date_long($sales_products['date_purchased']); if ($cur_order && ($sales_products['orders_id'] != $cur_order)) { //if order number has changed and this is not the start of the // first order, close previous order and print subtotal ?> </td></tr> <tr><td></td><td colspan="3"> Order Total <br> </td><td align="right"> <?php $a="select value from orders_total where orders_id = '". $cur_order."' and class = 'ot_total'"; //echo $a; $order_total_query = tep_db_query($a); $order_total = tep_db_fetch_array($order_total_query); echo $currencies->display_price($order_total['value'],0); $total_orders++; // count orders $grand_total += $order_total['value']; // total of order sales amts ?> </td></tr> <tr> <?php } // end if order number has changed $cur_order = $sales_products['orders_id']; // init cur order } // end if showing by date else { $ddp = 'Products Sold In Specified Time Period'; $table_title = 'Verkochte producten binnen deze tijds periode'; } if (($dp != $ddp)) { //if day has changed (or first day) if ($dp != '') { //close previous day if not first one ?> </table></td> </tr> </table></td> </tr> <tr> <td><br></td> </tr> <?php } ?> <tr> <td class=main><b><?php echo $table_title ; // echo "Start date : ".$date1."<br>"; //echo "End date : ".$date2; ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="60%" cellspacing="1" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width="15%"><?php echo TABLE_HEADING_MODEL; ?></td> <td class="dataTableHeadingContent" width="40%"><?php echo TABLE_HEADING_NAME; ?></td> <td class="dataTableHeadingContent" align=center width="15%"><?php echo TABLE_HEADING_QUANTITY; ?></td> <td class="dataTableHeadingContent" align="center" width="15%"><?php echo TABLE_HEADING_TOTAL; ?> </td> <td class="dataTableHeadingContent" align="center" width="15%"><?php echo TABLE_HEADING_TOTAL_TAX; ?> </td> </tr> <?php } ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo '<a href="../../catalog/product_info.php?products_id=' . $sales_products ['products_id'] . '" target="_blank">' . $sales_products ['products_model']; ?></a></td> <td class="dataTableContent"><?php echo $sales_products ['products_name']; ?></td> <td class="dataTableContent" align=center><?php echo $sales_products ['qty']; ?></td> <td class="dataTableContent" align=right><?php echo $currencies->display_price($sales_products ['daily_prod'],0); ?> </td> <td class="dataTableContent" align=right><?php echo $currencies->display_price($sales_products ['withtax'],0); ?> </td> </tr> <?php $total+=$sales_products ['daily_prod']; $total_wtax+=$sales_products ['withtax']; $dp = $ddp; } // end while (sales_products) if (($HTTP_GET_VARS['by']=='date')) { // close order and print subtotal ?> </td></tr> <tr><td></td><td colspan="3"> Order Totaal <br> </td><td align="right"> <?php $a="select value from orders_total where orders_id = '". $cur_order."' and class = 'ot_total'"; //echo $a; $order_total_query = tep_db_query($a); $order_total = tep_db_fetch_array($order_total_query); echo $currencies->display_price($order_total['value'],0); $total_orders++; // count orders $grand_total += $order_total['value']; // total of order sales amts ?> </td></tr> <tr> <?php echo '<tr><td></td><td colspan="2">Hoeveelheid Orders:</td><td class="main" align="right"> </td><td class="main" align="right">'. $total_orders.'</td></tr>'; echo '<tr><td></td><td colspan="3">Totaal Product verkopen: (inclusief verzendkosten)</td><td class="main" align="right">'. $currencies->display_price($grand_total,0).'</td></tr>'; } // end if showing by date echo '<tr><td></td><td colspan="2">Totaal Product verkopen: (exclusief verzendkosten)</td><td class="main" align="right">'. $currencies->display_price($total,0).'</td><td class="main" align="right">'. $currencies->display_price($total_wtax,0).'</td></tr>'; } else { ?> <tr> <td class=main><b>Er zijn geen verkopen in de gekozen periode.</td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  4. I found one other contribution (on this forum) and it is working together with this contrib.Sort Products By Dropdown I didn't use al the extra's this contrib also includes, like sort on bestsellers, (works with cronjob) so left out most of it. Best thing it sorts the way I want, with a nice dropdown on top of the page. Don't forget to add the "Fix Next Page Problem" from version 1.2 otherwise you lose your sorting on every other page in the categorie.
  5. Hi have you found some solution on this? I am also searching to sort the way you want to.Or just maybe to sort in price, starting from cheapest. It sorts alphabeticaly now for me sorting in price would be better.
  6. Mmmm I made a mistake, It didn't seemed to find the stylesheet at all. In the instructions i found: In stylesheet.css, add the following to the very first line: @@import url("headertags_seo_styles.css"); This was a bit confusing for me, since I am using STS, so my stylesheet would be in catalog/inludes/sts_templates/mytemplate/style.css So I put the above line in the stylesheet of my template (catalog/includes/sts_templates/mytemplate/style.css I also changed @@import url("headertags_seo_styles.css"); in @@import url("catalog/headertags_seo_styles.css"); Since the headertags style sheet is not in the same directory, this didn't work. But when I put the headertags_seo_styles.css in the directory of my template it does work. Only thing is, to remember I put it there, I rather go for my first solution to leave it in the catalog directory, and change the line @@import url("headertags_seo_styles.css"); to something that says catalog/
  7. I changed the style sheet catalog/headertags_seo_styles.css h1 { font-family: Verdana, Arial, sans-serif; font-size: 20px; font-weight: bold; margin-bottom: 0; padding-bottom: 0; color: #9a9a9a; Into font-size: 12 but nothing seams to change.
  8. The H1 tag is giving me product names and prices which are sometimes to big, for my lay-out. Especially with products on special, the lay-out is not the way I want it. I am using oscommerce version RC2A and STS contrib installed. In CSS one can make changes to the H1 tag like font size etc. Anyone where or how can I make changes to get this work with HEADER TAGS SEO (this) contrib? Also would it change my rating in search bots? Thanks for helping out.
  9. I Finally uninstalled this contrib (randelia custom meta tag per item) and installed Header Tags SEO 3.2.8 with instructions how to work with STS.Works like a charm!
  10. I Finally uninstalled this contrib, and installed Header Tags SEO 3.2.8 with instructions how to work with STS. Works like a charm! Unfortunately for this old one.
  11. I am using STS module versie 4.6_1 on a RC2a install, the site looks fine the contib works, but I have a problem with one contribution. Randelia Custom Meta Tag per Item, wich is located here: http://www.oscommerce.com/community/contributions,3726 Unfortunately the metatags are not working and i have al lot of them. I have posted this issue on the forum of the above contrib, http://www.oscommerce.com/forums/index.php?showtopic=179128 but it seems to be a dead threat. Anyone??
  12. I have this contribution working for some years, in different sites, I want to have it working in combination with SIMPLE TEMPLATE SYSTEM (STS) contribution, but unfortunately I haven't been able to get it working. Al the info is in the admin, everything seems to be ok, but it doesn't generate metatags! I can tell, since there is no title tag displayed from the productpage. It also takes the title tag (if nothing has been configured in one product) from the administration, not the title as configured in catalog/includes/functions/general.php Where do I need to make any changes?? anyone?
×
×
  • Create New...