Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by beerbee

  1. Hi, a very simple approach is to make a copy of the specials table before storewide sale - via phpmyadmin - and then by renaming it to its original name after storewide sale time is over. Best regards Christoph
  2. Hi, in FF you could try network analysis press ctrl+shift+e, then reload your page look for insecure traffic/requests. Best regards Christoph
  3. @raiwa, works like a charm, thanks! I think others might like it too. Best regards Christoph
  4. Hi, have a look: Best regards Christoph
  5. Hi again Rainer @raiwa, already tried putting $navigation as global into function execute() of cm_sc_checkout (wrong place?), for testing i put $sc_checkout = '<div class="row">' . sizeof($navigation->path); It stays zero. But this seems to be all over the site, regardless (index, product_info) of where I put it: always zero. Best regards Christoph
  6. Hi @raiwa, I was trying to add a continue shopping button to the checkout module but this <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'glyphicon-chevron-left', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']), 'primary', NULL, 'btn-success') . " " ; } ?> doesn't work anymore (for me). It seems to me that sizeof is always 0. Any clues? Best regards Christoph
  7. Hi, advises to combine all .css files into one. Then I found that: leading me there and then this came out <?php $cssFiles = array( "ext/bootstrap/css/bootstrap.min.css", "custom.css", "user.css" ); /** * Ideally, you wouldn't need to change any code beyond this point. */ $buffer = ""; foreach ($cssFiles as $cssFile) { $buffer .= file_get_contents($cssFile); } // Remove comments $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); // Remove space after colons //$buffer = str_replace(': ', ':', $buffer); // Remove whitespace //$buffer = str_replace(array("\r\n", "\r", "\n", "\t"), '', $buffer); // Collapse adjacent spaces into a single space //$buffer = ereg_replace(" {2,}", ' ',$buffer); $buffer = preg_replace('/[\t\r\n]+/', '', $buffer); $buffer = preg_replace('/[\s]{2,}/', ' ', $buffer); $buffer = str_replace(': ', ':', $buffer); // Remove spaces that might still be left where we know they aren't needed $buffer = str_replace(array('} '), '}', $buffer); $buffer = str_replace(array('{ '), '{', $buffer); $buffer = str_replace(array('; '), ';', $buffer); $buffer = str_replace(array(', '), ',', $buffer); $buffer = str_replace(array(' }'), '}', $buffer); $buffer = str_replace(array(' {'), '{', $buffer); $buffer = str_replace(array(' ;'), ';', $buffer); $buffer = str_replace(array(' ,'), ',', $buffer); // Enable GZip encoding. ob_start("ob_gzhandler"); // Enable caching header('Cache-Control: public'); // Expire in one day header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT'); // Set the correct MIME type, because Apache won't set it for us header("Content-type: text/css"); // Write everything out echo($buffer); ?> Saved as css_compress.php loaded up to catalog root and included into template_top.php with <link rel="stylesheet" type="text/css" media="screen, print, projection" href="css_compress.php" /> instead of the single css files, only problem is now that glyphicon fonts (which i will get rid of anyway) gives 404. Another question would be how to get css files of addons into that array also. Any thoughts ideas? Best regards Christoph
  8. Hi, and now a little bit back to the original topic this thread was about. I am totally not satisfied with something like $oscTemplate->getBlocks('footer_scripts'). This is confusing css with js all the way. In general there should be css loaded first an then get to js scripts after. Everything should be non blocking. The trick is just mentioned before : 1 2 3 4 <style id="init-style"> *{color:#fff; border:0; background:none;} img,button{display:none;} </style> is all the style gets loaded before everything else is present and looking beautiful through your css and js efforts. It would be much better to have a discerning loading of css and js than a mixed up one discerning footer and header. Best regards Christoph
  9. Hi @raiwa, thank you so much for looking into it. But its not only the question of the amount of data requested but also if the browser has to render (consuming loading time) the correct size and how close it to requested result. The closer you get to the result, the less will be complaints about rendering time to cover requested resolution. So my thoughts were going this way: If there is no definition for an image size like e.g. SMALL_IMAGE_WIDTH then <picture> should jump in providing relevant resolutions for example if you'd say picture on product_info should take a percentive place on certain devices. The less scaling work a browser has to do the better the speed. This might be be not so much a question of the user experience, but may be a question how the search engines might classify your site. Best regards Christoph
  10. Hi, reminds me of oscms. Best regards Christoph
  11. @burt yes. I asked @raiwa I think KissIT could do it. Best regards Christoph
  12. Hi John, nevertheless requests are time consuming too, ideally you would have one css an one js file to load non blocking - and it really depends how much blown up is the user css and how many and big additional css scripts are loaded by addons. At the moment I'm making experiments with the way css (in combination with initial post) and js is loaded mentioned in the post just above yours and it is really interesting - only blocking script is cookie.js ATM to be complained about by speed testing tools . As for images: Im trying my best for compression, KissIT for thumbs, and the <picture> approach for logo and slides. Which means: I want to look my logo not looking pixelated on hires devices but have smaller versions loaded on smaller devices. Module for logo in header looks like this (hardcoded just for proof of concept): <div id="storeLogo" class="col-sm-<?php echo $content_width; ?> storeLogo"> <?php echo '<a href="' . tep_href_link('index.php') . '"> <picture> <source media="(min-width: 1000px)" srcset="images/store_logo.png"> <source media="(min-width: 600px)" srcset="images/store_logo_900.png"> <source media="(min-width: 400px)" srcset="images/store_logo_600.png"> <source media="(min-width: 300px)" srcset="images/store_logo_400.png">' . tep_image('images/' . STORE_LOGO, STORE_NAME) . '</picture></a>'; ?> </div> Best regards Christoph
  13. Hi @Tsimi , on line 368 of specials.php echo $start_date; is the reason for the headers already sent error. Seems to be a left over for testing purpose? And another question: I'd like to be able have a filter which is showing/editing only products that have no special price yet just the opposite to show only specials, could be useful for a global time limited discount on all products excluding the products that have special prices already. Best regards Christoph
  14. A very interesting read in the context IMHO: Especially the part about "Get rid of render blocking scripts" might lead me to more attempts to load all js and css stuff in on place in the right order but no more before </head> except for template_top.php The usage part in before mentioned link part would go into template botttom. I will according to my limited abilities do simple evil core and addon code changes just for the proof of concept, and be happy to get help implementing this in a more like $oscTemplate->addBlock or $oscTemplate->getBlocks('footer_scripts') way. This could be a general way of injecting/adding javascript and css in a very elegant and speedy way in the future. Best regards Christoph
  15. I can't tell exactly but it helps definitely I get 5 seconds on the index that was worse before. PageSpeed Score (95%) YSlow Score (81%) for desktop at I think every little bit helps. The coding effort, I'd really like to know if it was possible to get something like $oscTemplate->addBlock to add css to the array instead injecting into the page.. The simple wrong way is not so much of an effort -> comment out in module, add to array in css_compress.php. Another thing I like about it: No more unminify for editing and then minifying again, I added bootstrap.css to the array instead of min as it makes no difference anymore. Best regards Christoph
  16. Hi @MrPhil, the css is rendered in the order of the files in the array, which means in this case user.css at last, just the normal behaviour. Relative addresses a problem - yes true. The file is rendered on the fly with adjustable caching, so there is no need to recreate manually after changing one of the css files. Best regards Christoph
  17. All php files should be also saved in UTF8. Best regards Christoph
  18. I was asking this because this happened to me if the customer would have special chars in his name (in Germany umlauts like ä ü etc.) And this could happen too if the shop name, or the recipients name would contain special chars. So the problem seems to be only for order seems not to be depending on whether from admin or catalog side mail gets initiated. Please look for mail.log there should be very likely a kind of error report in it. I am clueless now. Best regards Christoph
  19. Sorry but I had to ask that. More questions: customer gets an email when he as registered as new customer? Any Special characters in subject of order confirmation? It seems to me now that emails getting initiated by the catalog side are not working and those from the admin side do work, try the contact_us form do you get emails? Best regards Christoph
  20. But you know that this was a placeholder ? Please look for mail.log or ask your provider where to find it. Best regards Christoph
  21. Hi Peter, sorry no solution but 3 more questions: Does the customer get order confirmation email? Is the admin email configured like this: Peter<> Are there any special characters in the name like Ordóñez? Look if you got an mail.log file on your server, maybe you'll find the reason there. Best regards Christoph
  22. Hi @mcmannehan, I had this problem because I have Security Pro installed which kicked out any umlauts in the search. If that is the case you could change in includes/modules/fwr_media_security_pro.php both instances of this: $cleansed = preg_replace ( "/[^\s{}a-z0-9_\.\-]/i", "", urldecode ( $string ) ); to that: $cleansed = preg_replace ( "/[^\s{}äÄöÖüÜßa-z0-9_\.\-]/i", "", urldecode ( $string ) ); And save as UTF8 without BOM. Best regards Christoph
  23. @raiwa Hi, I just stumbled upon this article and started to think if this srcset thing could be theoretically implemented into KissIT? If I get the whole thing right this could be very useful for mobile devices where images are scaled down by the browser and slowing down loading time, at the end of the article there is wordpress plugin mentioned. Best regards Christoph
  24. @burt The (oldeee) live store is also running on 1und1 shared hosting with php 5.5.38 sessions also stored in file, its a kind of v2.3.3.2 oscommerce, there are no problems with sessions expiring, i could post the code of that old sessions.php if you think that it is useful regarding diffferencies. Best regards Christoph
  25. Hi, @Demitry and @burt it is the same here on my BSEdge playground, running on german 1und1 shared hosting, PHP Version 5.6.31, sessions stored in file, the above mentioned fix works, I have to hope it is not harmful in anyway. Best regards Christoph