Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


piernas last won the day on December 23 2016

piernas had the most liked content!


About piernas

Profile Information

  • Real Name
  • Gender
  • Location
  1. @@mattjt83 thanks, I'll re-install again with a blank database, maybe that's the problem.
  2. I was just playing with this and found an incompatibility. When you access modules->content the messagestack from the shop side is being executed, and being different to the one in the shop side it throws an error: Fatal error: Call to undefined method messageStack::size() in E:\_responsive_admin\includes\modules\content\header\cm_header_messagestack.php on line 37 A patch to avoid it may be adding an empty size() method to the admin class for now, but more incompatibilities might raise. @@mattjt83 @@GLWalker did you keep working on it? Did you found something else?
  3. What happens exactly? I was thinking it was finished
  4. @@John W the code is for the who's online enhancement ; the stock module does not have any code for bots.
  5. I imagine there was no need to keep the spider flag once the cookie has been forced. It's interesting for who is online addon but the stock module is very limited.
  6. I've wondered why who's online addon did not identify bots other than googlebot and showed as normal users. I have updated spiders.txt for each bot I find, but none of them showed as bots on this addon. Today, while adapting this addon to recent osc versions, I finally found the problem: If you have SESSION_FORCE_COOKIE_USE set to true oscommerce skips completely the check for spiders and $spider_flag variable is not set at all. So, if you experience this problem with your configuraton, all you have to do is do the check on the includesfunctions/whos_online.php file: Right below: function tep_update_whos_online() { global $customer_id, $spider_flag, $user_agent; add: is_spider (); and in the end of the file add the function itself: function is_spider () { global $user_agent, $spider_flag; $spider_flag = false; if (tep_not_null($user_agent)) { $spiders = file('includes/spiders.txt'); $n=sizeof($spiders); for ($i=0; $i<$n; $i++) { if (tep_not_null($spiders[$i])) { if (is_integer(strpos($user_agent, trim($spiders[$i])))) { $spider_flag = true; break; } } } } } Now the bots will show as boots :) assuming the correct strings are on spiders.txt
  7. I'm curious on how this will work. Will still be allowed to just upload an app via ftp or will be mandatory to download and install them via the marketplace?
  8. Thanks for the update - I'll take a look as soon as I can
  9. It can't be done on a stock oscommerce install. You need an URL rewriter. @@aurelou I personally use Ultimate seo urls 5 contribution, that allows each page to have a different URL for each language (because my store is 10 years old and well indexed, and I don't want all the pages to loose its rankings) but there's also a newer URL rewriter that allow the same results: But if you want to have completely different domains I'd go for the seecond solution, yes.
  10. @@aurelou The downside for languages in oscommerce is, by default, the url for all languages is the same, so you need a url rewritter for that matter. IE. you can't use, for example, the <hreflang> tag. There's no chance to use sub domains for different languages by default; I think you could do it by installing two copies of the code under different sub domains using the same database, and alter the code of each one to only allow the specified language - or only one code set that detects the sub domain you're using and change the output code accordingly...
  11. @@greasemonkey sorry I missed your message. What I've done for now consists in two parts: The ajax update of the +/- controls and the update of the modules that references the shopping cart. It basically works but I still need to polish the code and review the stock check part. This is the javascript I use: <script> $(document).ready(function() { var delete_id = "<?php echo TEXT_DELETE_PRODUCT;?>"; function formPost(product_id) { openModal(); $('#updated_product').val(product_id); $.post($('form[name="cart_quantity"]').attr("action"), $('form[name="cart_quantity"]').serialize(), function(data) { $("#navbar-cart").replaceWith($(data).find('#navbar-cart')); $("#navbar-full-cart").replaceWith($(data).find('#navbar-full-cart')); $("#cart_subtotal").replaceWith($(data).find('#cart_subtotal')); $("#btn-cart").replaceWith($(data).find('#btn-cart')); product_id = product_id.replace(/{/g, '\\{'); product_id = product_id.replace(/}/g, '\\}'); $("#price_" + product_id).replaceWith($(data).find("#price_" + product_id)); closeModal(); }); } function deleteProduct(product_id) { var formAction = 'shopping_cart.php?products_id=' + product_id + '&action=remove_product'; $('form[name="cart_quantity"]').attr('action', formAction); $('form[name="cart_quantity"]').submit(); } $('input[name="cart_quantity[]"]').keydown(function(e) { if ($.inArray(e.keyCode, [46, 8, 9, 27]) !== -1 || (e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) || (e.keyCode >= 35 && e.keyCode <= 40)) { // let it happen, don't do anything return; } if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { e.preventDefault(); } if ((e.keyCode == 13)) { e.preventDefault(); return false; } }); $('input[name="cart_quantity[]"]').keyup(function(e) { var product_id ='qty_', ''); var input_pid ='#' +; input_pid = input_pid.replace(/{/g, '\\{'); input_pid = input_pid.replace(/}/g, '\\}'); plus_pid = input_pid.replace('qty_', 'plus_'); var quantity_stock = $(plus_pid).attr("max-value"); if (this.value == "" && quantity_stock >0 ) { // Hay al menos una unidad en existencias this.value = 1; } else if (this.value == "" && quantity_stock <=0 ){ // TODO: Mensaje eliminar producto y eliminarlo tras aceptar. alert (delete_id); deleteProduct(product_id); } if (this.value > quantity_stock) { this.value = quantity_stock; alert ("<?= TEXT_MAX_QUANTITY ?>"); } formPost(product_id); }); $(".cart-plus").click(function() { var pid = $(this).attr("id"); pid = pid.replace('plus_', ''); var product_id = pid; pid = pid.replace(/{/g, '\\{'); pid = pid.replace(/}/g, '\\}'); input_pid = '#qty_' + pid; var quantity_stock = $(this).attr("max-value"); var quantity_asked = parseInt($(input_pid).val()) + 1; if (quantity_asked <= quantity_stock) { // sumamos 1 ud al carrito $(input_pid).val(parseInt($(input_pid).val()) + 1); formPost(product_id); } else { // mensaje "no hay stock suficiente" alert("<?= TEXT_MAX_QUANTITY ?>"); } }); $(".cart-minus").click(function() { var product_id = $(this).attr("id").replace('minus_', ''); pid = product_id.replace(/{/g, '\\{'); pid = pid.replace(/}/g, '\\}'); var input_pid = '#qty_' + pid; var del_id = "<?php echo TEXT_CONFIRM_DELETE;?>"; var quantity_stock = $(this).attr("max-value"); var quantity_asked = parseInt($(input_pid).val()) - 1; // Borrar o sustraer cantidad if (quantity_asked == 0 && quantity_stock < 1) { // codigo para borrar producto alert(delete_id); deleteProduct(product_id); } else if (quantity_asked == 0 && quantity_stock > 0) { if (confirm(del_id)) { // pedimos confirmaciĆ³n // codigo para borrar producto deleteProduct(product_id); } } else { $(input_pid).val(quantity_asked); // restamos 1 // actualizamos cesta formPost(product_id); } }); }); For the total cart and navbar module I use an external dummy file that updates cart values and only loads application_top and the corresponding modules. The script reads those values and replaces the parts of the page that needs to be updated. I use a custom navbar and shopping cart so the code of the file will not be really useful for you, but you need ot put the module's content inside a div and the javascript will replace it. For example, for my cart totals I use on the dummy file: <div id="replacementsubtotal"> <p style="font-size: 14px" id="cart_subtotal" class="label label-success"><strong><?php echo SUB_TITLE_SUB_TOTAL ?> <?php echo $currencies->format($cart->show_total()); ?></strong></p> </div>
  12. If you have enough knowledge of php you can create your addon for the task that does it on checkout_success.php (you have to add the information to the default purchase email; if not, there's a commercial support forum here: Also, you can inspect the already done public addons here: to see if there's something similar already done.
  13. I've tested on wamp/php 5.6.28/oscommerce 2.3.4 and linux/php 5.3.29/oscommerce 2.2 but as @@wHiTeHaT says it's strange as the cart variables aren't updated at that point.
  14. @@burt It also happens on an old 2.2 shop: ["cart"]=> &object(shoppingCart)#1 (5) { ["contents"]=> array(0) { } ["total"]=> float(55) ["weight"]=> float(1.5) ["cartID"]=> string(5) "22143" ["content_type"]=> bool(false)