Jump to content

alman

Members
  • Content count

    39
  • Joined

  • Last visited

Everything posted by alman

  1. alman

    [Development] Products Specifications

    for all that use the alt products_specification.php the alt colour was added to the other tabs this corrects it look for; $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%">' . and change to: $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%" class="altspec">' . in products_info.php $('div.content tr:even').addClass('alt'); change to: $('table.altspec tr:even').addClass('alt'); in stylesheet.css add: table.spec{ text-align: left; } Al
  2. alman

    CKEditor and other WYSIWYG

    nice one thanks for the input I don't think it would be compatible but it could be a better approach to a solution if you have made changes to your admin use winmerge or kompare to check the files before dumping them on top. I have not looked at 2.3.1 with ckeditor yet al
  3. alman

    CKEditor and other WYSIWYG

    search for tep_draw_textarea in the file which is called when you go to that page in admin eg. info_pages.php and change it to tep_draw_textarea_ckeditor and add the javascript as well and all should work fine. Al
  4. alman

    "Dynamenu" for osCommerce

    I found depreciated functions for php 5.3 in includes/functions/dynamenu/lib/layersmenu-common.inc.php 2 instances of $buffer = ereg_replace(chr(13), '', $buffer); replace $buffer = preg_replace('/chr(13)/', '', $buffer); find $this->tree[$cnt]['parsed_href'] = (preg_replace(' ', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; replace with $this->tree[$cnt]['parsed_href'] = (preg_replace('/\ /', '', $this->tree[$cnt]['href']) == '') ? '#' : $this->prependedUrl . $this->tree[$cnt]['href']; hope this helps al
  5. alman

    "Dynamenu" for osCommerce

    $result = tep_db_query('select c.categories_id, cd.categories_name, c.parent_id from ' . TABLE_CATEGORIES . ' c, ' . TABLE_CATEGORIES_DESCRIPTION . ' cd where c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id="' . (int)$languages_id .'" '.$parent_query.'order by sort_order, cd.categories_name'); this will solve your problem al
  6. alman

    CKEditor and other WYSIWYG

    Hi Ron, tep_draw_fckeditor is called on that page on line 96 change to tep_draw_textarea_ckeditor which should be added to html_output.php as per the instructions version 3.6 should still run fine let me know if you have any problems Al
  7. check that in categories.php it should look like this where the 10 is you will have a 15 which is fine but i suspect that you have a soft in there like this 'soft', '70', '10', which will cause that this is a reference bellow

    tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10...

  8. alman

    [Development] Products Specifications

    Hi guys, If you use the same specs for multiple categories and have a filter in one category but no values set in another the filter will still display so to sort this out a count per category would need to be set it would need to count the spec values in a category instead of just values in a spec group. my thoughts would be to add table categories to the $filters_query_raw syntax query strings are not my strong suit and have not been able to get it working Al
  9. it might be easier if you see what I mean http://acronsystems.com/ network cables and that did not work and 10+ is way off the mark
  10. hey guys, I may have found a possible bug I loaded in specs 0.5, 1, 1.5, 2, 3, 5, 10, 15, 20 and 30 with a suffix of M, now when I set a filter range of 2 5 10 it can not distinguish the difference between 1 and 10, 2 and 20, 3 and 30. I am sorry I do not have a solution. has anyone had this problem? Al
  11. alman

    CKEditor and other WYSIWYG

    Hi Jo, in file admin/ckeditor/filemanager/config.php you will find require ($_SERVER['DOCUMENT_ROOT'].'/catalog/admin/includes/configure.php'); make sure this points to your osc install this error normally has more to it is as it should tell you where it is trying to find this is the path to images which is what we are trying to find $uploadpath = DIR_WS_CATALOG_IMAGES; // absolute path from root to upload If it is a windows machine Im not sure if $_SERVER['DOCUMENT_ROOT is valid you could try full path require ('C:/catalog/admin/includes/configure.php'); hope this helps let me know how you get on Al
  12. alman

    CKEditor and other WYSIWYG

    ckeditor filemanager 1.1 contribution 1)http://localhost/cat...admin/ckeditor/filemanager so ckeditor zip goes in ckeditor directory and the pdw filemanager goes into the filemanager directory check the directory structure it should be it is in the drop files supplied in the contribution. 2) did you copy over the files supplied into the filemanager directory. and change at the top of each one where it is including the admin/includes/configure.php alan
  13. alman

    CKEditor and other WYSIWYG

    there is a easier method that I uploaded contributions page it is integrated with a opensource filemanager it is a case of calling so a example would be in admin\categories.php above </head> add <script type="text/javascript" src="./ckeditor/ckeditor.js"></script> and find tep_draw_textarea_field and replace with the new function tep_draw_textarea_ckeditor so it looks like bellow <td class="main"><?php echo tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']','70', '20',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> I added full url support so if you use it for newsletter emails the images will load for the customer alman
  14. alman

    Multi_Vendor_Shipping new thread

    Warning: strpos() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46 Warning: substr() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46 if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { change it to if ( (is_string($module) && (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array))) ) { and it is causing ot_shipping to through the same errors as well $module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_')); so change it to $module = is_string($GLOBALS) && (substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_'))); hope this helps Al
  15. alman

    Multi_Vendor_Shipping new thread

    I added it to mvs addons for convenience, compare it to the IPN you have if you have already made changes Alman
  16. alman

    Multi_Vendor_Shipping new thread

    hi all there has been talk for a long time on mvs and paypal ipn merger as it were in modules-payment-paypal_ipn.php find function confirmation() { and add $shipping after $order_total_modules find tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array); } } } } after add //MVS if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){ $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { $vendors_query = tep_db_query("select vendors_name from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_name = 'Unknown'; if ($vendors = tep_db_fetch_array($vendors_query)) { $vendors_name = $vendors['vendors_name']; } $shipping_method_array = explode ('_', $shipping_data['id']); if ($shipping_method_array[0] == 'fedex1') { $shipping_method = 'Federal Express'; } elseif ($shipping_method_array[0] == 'upsxml') { $shipping_method = 'UPS'; } elseif ($shipping_method_array[0] == 'usps') { $shipping_method = 'USPS'; } else { $shipping_method = $shipping_method_array[0]; } $sql_data_array = array('orders_id' => $insert_id, 'vendors_id' => $vendors_id, 'shipping_module' => $shipping_method, 'shipping_method' => $shipping_data['title'], 'shipping_cost' => $shipping_data['cost'], 'shipping_tax' => $shipping_data['ship_tax'], 'vendors_name' => $vendors_name, 'vendor_order_sent' => 'no' ); tep_db_perform(TABLE_ORDERS_SHIPPING, $sql_data_array); } } //MVS End thats it hope this helps Al
  17. alman

    [Development] Products Specifications

    Thanks for your reply Jim I put it together with jquery as we had it loaded for tabs anyway and cleaned the code from the above. I finished it before you replied I didn't think of that as a solution, good input. I wasn't thinking outside the box. I added it as a addon for product specification link maybe It could could be added as a enhancement for the next release Thanks for the contribution Al
  18. alman

    [Development] Products Specifications

    amendment for above change to bellow $specification_text = '<ul><div id="speci"><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%">' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= ''; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= '<tr><td width="21%" class="specification_bold"><li>'; $specification_text .= $specifications['specification_name'] . ': '; $specification_text .= '</li></td>'; } $specification_text .= '<td width="79%" class="specification">'; $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</td></tr>'; $specification_text .= '' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</table></div>'; $specification_text .= '</ul>' . "\n"; as a side point I was looking into striping each table row stated in the posts above and knew I had code for that somewhere create a file called zebra.js and paste a normal call would be as bellow but it needs to be a Div call or something because we already have a js call for the tabs I cant get this to work if some could shed some light it would be great!! <script type="text/javascript" src="js/zebra.js"></script> <script type="text/javascript"> $(document).ready(function() { stripe("#SPEC"); }); </script> // this function is needed to work around // a bug in IE related to element attributes function hasClass(obj) { var result = false; if (obj.getAttributeNode("class") != null) { result = obj.getAttributeNode("class").value; } return result; } function stripe(id) { // the flag we'll use to keep track of // whether the current row is odd or even var even = false; // if arguments are provided to specify the colours // of the even & odd rows, then use the them; // otherwise use the following defaults: var evenColor = arguments[1] ? arguments[1] : "#ffff99"; var oddColor = arguments[2] ? arguments[2] : ""; // obtain a reference to the desired table // if no such table exists, abort var table = document.getElementById(id); if (! table) { return; } // by definition, tables can have more than one tbody // element, so we'll have to get the list of child // <tbody>s var tbodies = table.getElementsByTagName("tbody"); // and iterate through them... for (var h = 0; h < tbodies.length; h++) { // find all the <tr> elements... var trs = tbodies[h].getElementsByTagName("li"); // ... and iterate through them for (var i = 0; i < trs.length; i++) { // avoid rows that have a class attribute // or backgroundColor style // if (! hasClass(trs[i]) && // ! trs[i].style.backgroundColor) { // get all the cells in this row... var tds = trs[i].getElementsByTagName("td"); // and iterate through them... for (var j = 0; j < tds.length; j++) { var mytd = tds[j]; // avoid cells that have a class attribute // or backgroundColor style // if (! hasClass(mytd) && // ! mytd.style.backgroundColor) { mytd.style.backgroundColor = even ? evenColor : oddColor; // } } } // flip from odd to even, or vice-versa even = ! even; } } // } Al
  19. alman

    [Development] Products Specifications

    hey Guys, this is just a change in the set out of the spec on product_info.php add to stylesheet.css .specification{ font-family: Tahoma, Verdana, Arial, sans-serif; color: #000000; font-size: 13px; } .specification_bold{ font-family: Tahoma, Verdana, Arial, sans-serif; color: #000000; font-size: 13px; font-weight: bold; } and I changed includes-modules-product_specification.php $specification_text = '<ul class=specification_box>' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= '<li>'; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= $specifications['specification_name'] . ': '; } $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</li>' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</ul>' . "\n"; to $specification_text = '<ul>' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= '<div id="speci"><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><span class="pageHeadingSM">'; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= '<td width="21%" class="specification_bold"><li>'; $specification_text .= $specifications['specification_name'] . ': '; $specification_text .= '</li></td>'; } $specification_text .= '<td width="79%" class="specification">'; $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['display'] == 'image' || $specifications['display'] == 'multiimage' || $specifications['enter'] == 'image' || $specifications['enter'] == 'multiimage') { tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</td>'; $specification_text .= '' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</span></tr></table></div>'; $specification_text .= '</ul>' . "\n"; Thats it hope this helps someone Al
  20. if someone uses Ultimate Images Pack by maxidvd admin categories.php find each instance unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image']); with unlink(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $HTTP_POST_VARS['products_previous_image']); and $products_image_med = new upload('products_image_med'); $products_image_med->set_destination(DIR_FS_CATALOG_IMAGES); if ($products_image_med->parse() && $products_image_med->save()) { $products_image_med_name = $products_image_med->filename; to look like this for each instance (15 of them) $products_image_med = new upload('products_image_med'); $products_image_med->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile); if ($products_image_med->parse() && $products_image_med->save()) { $products_image_med_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image_med->filename; hope this helps someone Al
  21. alman

    Ajax Buy Now

    product_info.php before </head> add <script language="JavaScript" src="includes/ajax_sc.js"></script> and also add the div statments as bellow <div id="divShoppingCard"> <td width="220" align="right" valign="middle" class="infoBoxContents"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> </td></div> if you use seo urls you may need to modify the the function is general.php to like $url . $add_session_id; have not tested this yet let me now how you get on?? al
  22. alman

    Ajax Buy Now

    what do you have in product_listing.php for buy now my product_info.php is as echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); I added <script language="Javascript" src="includes/ajax_sc.js"></script> Ajax works and adds to cart but does not change to OK.gif when finished Al
  23. found the problem FILENAME_ADMIN_FILES was defined twice and the first one had a typo in it. user error is usually the main reason for bugs Al
  24. I do not believe the contribution to be flawed I have had it working on a few rebuilds I am having trouble with it this time round I cannot access admin_files.php from the column but if I type it into the address bar I can get it up but cannot make any changes without forbidden.php I can access and change admin_members.php no problem and have full access can anyone share any idea's on this. register globals is off If you do not have the know how, time or patience backup all your files into a zip and add your database while you are at it BEFORE you make the changes. people take time to help and put together packages from scratch with skill that alot can not do even if they had the idea, for the most part everyones efforts on the free forum are appreciated
×