Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

bruyndoncx

♥Ambassador
  • Posts

    3,796
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by bruyndoncx

  1. I would like to have my manufacturers and categories descriptions take up a certain space and have a see more / see less link like is done on this website http://www.penguinrandomhouse.com/books/317943/a-visual-guide-to-drink-by-ben-gibson-patrick-mulligan/ Looking at the code I can see this is part of a View.Utils package probably within WP (theme ?) I understand a background image is used for the transparency effect, but what else is needed to make this work ? Is there any script like this floating about on the internet that could be integrated into oscommerce ?
  2. yes, everything is php code that you can modify
  3. The http://addons.oscommerce.com/info/8603module for 2.3.1. has the url hardcoded in the payment module (by default to a test system), evidently you can change that, or improve it so you could edit it from admin if you wanted to fyi, the multisafepay has the url for test and live hardcoded in the module, but allows you to switch (test/live) from the admin.
  4. I recently looked into using KBC paypage. As the backend is ogone, the API is pretty similar but not exactly the same. From KBC paypage I only received the technical implementation details of which field to pass mandatory/optional, but no ready made plugin to install. I thought about modifying the ogone module to work with kbc paypage, but then when I looked further I found that multisafepay provides an oscommerce plugin that is cheaper for low volume and covers my needs (ideal, bancontact, visa/...) pretty good too. So I'm in the process of implementing multisafepay now.
  5. these sql are fine for bootstrap too - nothing different in the configuration table
  6. must be something todo with your products if the backside works and the front doesn't (w00t) - WAD (WorkingAsDesigned)
  7. @@rudolfl Thanks for your insight, I'll add it to my toread/todo list :D
  8. @@Jack_mcs so the cache should be for active products (products_status =: 1) only, and fetch the data adhoc (when needed) for non-active products ? I was running into memory issues with the define statements (about 18000 products of which 7000 active) I'll continue to work on it so that it works like the other caching I have, but it is not standard. My cache uses apcu memorycache now (version of APC usercache for php 5.4/5.5) , then fallsback to a file cache (modified oscommerce cachemanager), and then only accessing the database. I'll share my work, you can see if it helps or not
  9. I was having trouble with the number of concurrent database connections, I've rewritten the code to use standard oscommerce tep_db functions as it will allow me to further finetune/debug things. When working on this, I was thinking these database round trips are rather silly most of the time, so I'm now working on caching the files. I noticed that define statements are generated, and wondered why define constants and not arrays are used. Is there a good reason for using defines over arrays to keep this cached data ?
  10. @@Gergely In stead of the above substring, I'm using the basename function to match so I can use *login.php and catch any login attempts, no matter what directory for subdirectories it is not yet working ideally, but I think this way it catches most attempts ... we'll see in a few days //basename gives the filename or the last directory name $search = basename($requested_url); /* wilcards */ // look after wildcards * only 301 redirections! // get all wildcards redirection examples // faster query search with 3 begining characters //$search = strstr($requested_url, 0, 3) . '%' . '*'; //basename gives the filename or the last directory name $search = basename($requested_url); $found = false;
  11. @@Gergely I'm confused by this section on wildcards - not sure how it is intended to work strstr function finds the first occurance of a string, did you mean to substring ? or looking for % or * position in the string ? /* wilcards */ // look after wildcards * only 301 redirections! // get all wildcards redirection examples // faster query search with 3 begining characters $search = strstr($requested_url, 0, 3) . '%' . '*'; $found = false;
  12. a little heads up, in your .htaccess the path to the error document handler is always from the document root, so if you test in a subdirectory, you need to spell out the complete path. Couldn't find an easy workaround solution, what i found on the web was rather complex and possibly interfering with other rewrite rules I have.
  13. just installed this in my development environment, reading through the installating docs, followed the link to the cpath fix on github. includes/functions/general.php section I think this does not need a LEFT join, just a regular JOIN all the way +// Validate a category path to the product + function tep_get_validate_product_cpath($products_id, $cPath = '') { + + $category_query = tep_db_query("select c.cpath from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on(p.products_id = p2c.products_id) left join " . TABLE_CATEGORIES . " c on(p2c.categories_id = c.categories_id) where p.products_id = '" . (int)$products_id . "' and p.products_status = '1'"); + + while ($category = tep_db_fetch_array($category_query)) { + + if ($category['cpath'] == $cPath) { + return true; + } + + } + + return false; + }
  14. I use easypopulate based on an old popular released version 2.76 for 10 years now ... you should look at the different versions and what you want supported. or you try some other newer alternatives, if you just add one record, you can't mess up much ...
  15. just a litte headsup, I integrated flickity slider (from the isotope guy) which is a responsive touch enabled slider that allows for swiping as a frontpage module, it is very easy to do based upon the banner rotator. currently I have settings hardcoded, but overall it is very easy to integrate.
  16. I'm not sure about the mistake, when I used prop my debugger complained. Not 100% sure on how/what exactly when to use prop vs attr - tricky one. I changed to attr and it worked, so I was happy about it :)
  17. Hmm couldn't sleep :D Here is what I've done on my admin to get this working for radio buttons and checkboxes, (NOT for selection fiellds) file admin/includes/modules/product_specifications_input in mine around line 80 find this section added sv.specification_values_id to the first line added 'data-sync' => $values_data['specification_values_id'], to the values_select_array $values_query_raw = "select svd.specification_value, sv.specification_values_id from " . TABLE_SPECIFICATIONS_VALUES . " sv, " . TABLE_SPECIFICATIONS_VALUES_DESCRIPTION . " svd where svd.specification_values_id = sv.specification_values_id and sv.specifications_id = '" . $id . "' and svd.language_id = '" . (int) $languages[$i]['id'] . "' order by sv.value_sort_order, svd.specification_value "; // print $values_query_raw . "<br>\n"; $values_query = tep_db_query ($values_query_raw); $values_select_array = array(); if (tep_db_num_rows ($values_query) > 0) { while ($values_data = tep_db_fetch_array ($values_query) ) { if ($values_data['specification_value'] != '') { $values_select_array[] = array ('id' => $values_data['specification_value'], 'data-sync' => $values_data['specification_values_id'], 'text' => $values_data['specification_value'] ); } } // while ($values_data echo tep_get_values_menu ($enter_values, $values_select_array, 'products_specification[' . $id . '][' . $languages[$i]['id'] . ']', $products_specification); Next change the tep_get_values_menu to output the data-sync attribute file admin/includes/functions/products_specifications I'm assuming that this won't have any side effects, if it does have side effects another function needs to be created and called in the above code block. the default radio field and checkbox functions won't work, so explicitly spelled out what it needs to be, so the changes are only in the section just below the commented out tep_draw lines case 'radio': foreach ($values_select_array as $value) { $checked = ($value['id'] == $specification_value) ? true : false; // $box_text .= tep_draw_radio_field ($specification_name, $value['id'], $checked) . ' ' . $value['text']; $box_text .= '<input type="radio" name="' . tep_output_string($specification_name) . '"'; if (tep_not_null($value['id'])) $box_text .= ' value="' . tep_output_string($value['id']) . '"'; if (tep_not_null($value['data-sync'])) $box_text .= ' data-sync="' . tep_output_string($value['data-sync']) . '"'; if($checked == true) $box_text .= ' checked="checked"'; $box_text .= '> ' . $value['text'].'<br>' . "\n"; } break; case 'checkbox': $checkbox_id = 0; foreach ($values_select_array as $value) { $checked = false; if (is_array ($specification_value) ) { foreach ($specification_value as $spec) { if ($spec['id'] == $value['id']) { $checked = true; break; } } } else { $checked = ($value['id'] == $specification_value[$checkbox_id] ) ? true : false; } // if (is_array ... else ... // $box_text .= tep_draw_checkbox_field ($specification_name . '[' . $checkbox_id . ']', $value['id'], $checked) . ' ' . $value['text']; $box_text .= '<input type="checkbox" name="' . tep_output_string($specification_name. '[' . $checkbox_id . ']') . '"'; if (tep_not_null($value['id'])) $box_text .= ' value="' . tep_output_string($value['id']) . '"'; if (tep_not_null($value['data-sync'])) $box_text .= ' data-sync="' . tep_output_string($value['data-sync']) . '"'; if($checked == true) $box_text .= ' checked="checked"'; $box_text .= '> ' . $value['text'].'<br>' . "\n"; $checkbox_id++; } // foreach ($values_select_array break; lastly, add the javascript in the admin/categories.php I added it just below the call for inclusion of the products_specifications_input file <?php // Products Specifications require (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS_INPUT); ?> <script> var $radios = $('input[type=radio][data-sync]'); $radios.change(function() { $radios.filter('[data-sync="' + $(this).attr('data-sync') + '"]').attr('checked', true); }); var $checks = $('input[type=checkbox][data-sync]'); $checks.change(function() { $checks.filter('[data-sync="' + $(this).attr('data-sync') + '"]').attr('checked', $(this).attr('checked')); }); </script>
  18. I have been troubled by this issue too, but my lists are not that long ... I looked at the code and found that 1) the specification_values_id is the same for the different values in the different langues 2) this is currently not part of the product edit screen, but pretty sure that is easy to add I have found a fiddle that demonstrates a javascript solution to sync radio buttons, I think using data-sync="specification_values_id" does the trick for radio buttons and probably checkboxes at the same time as a specification_values_id is specific to a specification id (stored in specification_values) http://jsfiddle.net/cTQeJ/2/ So it seems pretty easy to implement this. It is after midnight here, perhaps someone else has more hours left in their day :-
  19. Jim, when you edit a product - you have to supply each value for each language
  20. went live with oscommerce 234 and some materializecss

  21. To the followers of this topic On a related note, a real good recent article about best practices for ecommerce filters http://baymard.com/blog/macys-filtering-experience I just added some code on my test site to have a X link next to the selected filter to allow for easy removal, I think I'm gonna make my favorite list of links now all into checkboxes. Read the article and you will understand ...
  22. just remove c.categories_status = 1 and from the sql where clause and you should be fine. it is a field that comes from a enable/disable categories contribution
  23. materializecss html5 test frameworks robot - anyone ?

  24. you keep the click to enlarge text by replacing (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) with just TEXT_CLICK_TO_ENLARGE for the alt, please post the code in code tags, so it is readable again
×
×
  • Create New...