Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by bsmither

  1. Well, no, not all that different. Just two tweaks and this attempt at fixing the "bounci-ness".
  2. Edit: Do not do the following. This code allows for the "bounci-ness" of the main image area that we have been working to solve. --------------------- I do not know if the following version of that code is any better, but try: if($('a.open-clearing img#img-preview').length) { $('a.open-clearing img#img-preview').load(function() { var ip = $('a.open-clearing img#img-preview'); var ip_height = ip.height(); var ip_width = ip.width(); var min_height = ip_width * 0.7; if(ip_height<min_height) { ip_height = min_height; } // $('a.open-clearing img') // .css({ // 'max-height': ip_height+'px' // }); $('#open-clearing-wrapper') .css({ 'min-height':ip_height+'px', 'max-height': ip_height+'px' }); }); } Here, the image's container is getting sized, but not the image itself.
  3. You will not be replacing lines of code, but rather adding back two lines of code that was removed from CC622.. This is what you will be wanting to try: if($('a.open-clearing img#img-preview').length) { $('a.open-clearing img#img-preview').load(function() { var ip = $('a.open-clearing img#img-preview'); var ip_height = ip.height(); var ip_width = ip.width(); var min_height = ip_width * 0.7; if(ip_height<min_height) { ip_height = min_height; } $('a.open-clearing img') .css({ 'min-height':ip_height+'px', 'max-height': ip_height+'px' }); }); }
  4. For my dev-install, I was looking at a product page and the image was normal. I then requested the product's category page (via the breadcrumb). Then I pressed the browser's back button to re-show the product page. Then I clicked the browser's reload button (not the same reload that fetches fresh copies of the page's resources). The screen real estate given to the image has shrunk from 225 pixels max-height to 75.6 pixels max-height. The max-height values are added to the image and the image's <div> block via javascript when the page loads (2.cubecart.js).
  5. If this is repeatable, that is, once the normal sized image appears, how would the small size image get re-shown? Visit another page and come back to this? See if this issue in the Github helps: https://github.com/cubecart/v6/issues/2257 I just had it happen to my development installation. Researching.
  6. If there is only one image that could be shown in the small (horizontal) gallery - that of the one and only main image - then none of that will be displayed. The main image uses a 'medium' variant of the source image: 500 pixels on its longest side (according to the config.xml file). You can also use 'source' in the HTML: From: <div id="open-clearing-wrapper"><a href="#" class="open-clearing" data-thumb-index="0"><img src="{$PRODUCT.medium}" alt="{$PRODUCT.name}" id="img-preview"></a></div> To: <div id="open-clearing-wrapper"><a href="#" class="open-clearing" data-thumb-index="0"><img src="{$PRODUCT.source}" alt="{$PRODUCT.name}" id="img-preview"></a></div> The browser will scale it down to fit the available real estate.
  7. In the template content.homepage.php, for the first eleven lines of code: Change to: {if isset($DOCUMENT)} <div class="row show-for-medium-up"> <div class="small-12 columns"> <div id="content_homepage"> {if $DOCUMENT.hide_title==0}<h1>{$DOCUMENT.title}</h1>{/if} {$DOCUMENT.content} </div> </div> </div> {/if} Do the same edit as you did for main.php to the template main.checkout.php.
  8. In the Noodleman skin template main.php, find: Near line 26: <a href="{$ROOT_PATH}" class="main-logo"><img src="{$STORE_URL}/skins/noodleman_v6/images/noodleman/noodleman-logo.png" alt="{$CONFIG.store_name}"></a> Change to: <a href="{$ROOT_PATH}" class="main-logo"><img src="{$STORE_LOGO}" alt="{$CONFIG.store_name}"></a>
  9. This is a new function in CubeCart. It is designed to make the time that orders were made coincide with a datestamp in the MySQL database. See: https://github.com/cubecart/v6/issues/2240 In order to do this (send this command to the database server), the database must be configured with an operational table of timezones. This configuration can only be done by the database server's master administrator. There are a number of similar postings on the forum. You can either undo the code changes or insist that your hosting provider configure/load the database server with timezone data.
  10. We just added some diagnostic code. Nothing has changed that would make the project "all of a sudden" start working.
  11. Interesting. That suggests that the snippet is not getting executed, or the statement in the snippet: $this->_detectMobile(); is failing, or some other code is interfering with the GUI::mobile variable. Bring the snippet code up for editing. Change to: <?php $current_disable_mobile_skin_setting = $GLOBALS['config']->get('config', 'disable_mobile_skin'); $GLOBALS['config']->set('config', 'disable_mobile_skin', false); $GLOBALS['debug']->debugMessage("Before _detectMobile(), the GUI::mobile variable is ".(($this->mobile)?"True":"False")); $this->_detectMobile(); $GLOBALS['debug']->debugMessage("After _detectMobile(), the GUI::mobile variable is ".(($this->mobile)?"True":"False")); $GLOBALS['config']->set('config', 'disable_mobile_skin', $current_disable_mobile_skin_setting); This new code narrows where the likely problem might be found.
  12. We need to look deeper. In the CubeCart file /classes/gui.class.php: Near line 152, find: $css = array(); foreach ($GLOBALS['hooks']->load('class.gui.css') as $hook) include $hook; $GLOBALS['smarty']->assign('CSS', $css); Just BEFORE those statements, add: $GLOBALS['debug']->debugMessage("Before, the GUI::mobile variable is ".(($this->mobile)?"True":"False")); And then just after those statements, add: $GLOBALS['debug']->debugMessage("After, the GUI::mobile variable is ".(($this->mobile)?"True":"False")); In admin, Store Settings, Advanced tab, "Enable Debugging" set to Enabled, and enter your IP address in the next field (www.whatismyip.com). When you next ask for the storefront page, there will be a long grey 'debug' section at the bottom of the page. Near the bottom of the debug section will be any Debug Messages. Are there any and what do they say?
  13. I wonder if CubeCart is overwriting the Content (as shown in a post above) with a translation. I note that the French version of the HomePage document has seven images on the BXSlider, the English-US version has six images, and the English-UK version has three images. When in admin, Documents, do the flags in the Language and Translations columns make sense?
  14. Using your phone, it may be virtually impossible to determine what the User Agent string may be. However, examining the access logs maintained by the web server hosting your site will show it. (Visit your hosting account's control panel and look for Logs.) It could be that the UA string of your phone fails to match the pattern used by CubeCart to detect a mobile device. On the other hand, I am able to customize my browser to use a user-supplied UA string that I know CubeCart would see. That is how I tested this project. Visiting your site with same setting on my browser, indeed, the page contents do not change. I also see some strange-looking cookies. Would these indicate some sort of server-level caching? After making the edits to the source code of the HomePage document, did you clear CubeCart's cache? (I assume you know this by now, but I still have to ask.)
  15. In admin, Documents, click the Edit icon for any document. On the General tab, there will be a checkbox for "Parse Smarty Tags". It applies to this this document.
  16. The scenario is that there is some part of a document where the HTML for that part must not be present when the document is being displayed on a mobile device. The version of CubeCart must support parsing Smarty tags in the document (apparently, all versions of CC6). The mobile device must send a User Agent (UA) string that CubeCart will recognize as being a mobile device. When editing the Content of a document (the HomePage's BXSlider, for example), use the following: {if !GUI::getInstance()->mobile} <ul class="bxslider"> <li><img src="skins/foundation/images/examples/slide1.jpg" title="Message Foo" /></li> <li><img src="skins/foundation/images/examples/slide2.jpg" title="Message Bar" /></li> <li><img src="skins/foundation/images/examples/slide3.jpg" title="Message Baz" /></li> </ul> {/if} Be sure to have "Parse Smarty Tags" setting enabled. Then, create a snippet. In admin, Manage Hooks, Code Snippets tab, click Add Snippet. In the form that appears, fill in fields as follows: Enabled: Checked Unique ID: [email protected]+ Execution Order: 1 Description: Forces CubeCart to detect if a mobile device Trigger: class.gui.css Version: 1.0 Author: https://forums.cubecart.com/topic/54744-how-to-turn-bxslider-off-on-mobile-homepage PHP Code: <?php $current_disable_mobile_skin_setting = $GLOBALS['config']->get('config', 'disable_mobile_skin'); $GLOBALS['config']->set('config', 'disable_mobile_skin', false); $this->_detectMobile(); $GLOBALS['config']->set('config', 'disable_mobile_skin', $current_disable_mobile_skin_setting); The reason we use the "class.gui.css" hook is because CubeCart processes this hook early - before processing the action of getting a document ready for display. It also has to be a hook in the GUI class because that is where the private code is located that determines if the UA string is mobile. Let me know if I left anything out.
  17. Ok, so with a short Hook Snippet, we can override CC6's insistence that, if using a responsive skin, all aspects pertaining to "mobile" be ignored. Thus, if on a mobile device, the entire "bxslider" code block is discarded from the document. Complete instructions shortly.
  18. Unfortunately, the Github issue #1226 has not yet been implemented (as of CC622), so CubeCart will not run code to determine if a mobile device is being used when a responsive skin is in play.
  19. So, the one scenario that is proving difficult to solve is when a responsive skin is being shown on a mobile device. CubeCart might not know this is happening because the browser takes care of everything. So, we need to know if the browser can be told (somehow) to not load images if a CSS rule says "hide_for_small" (might be inside a media query). Or we can ask CubeCart if it detected the device is mobile.
  20. The solution is going to involve having CubeCart make a decision on how to deal with the HomePage document. This before CubeCart sends the finished page to the browser so as to not include the <ul class="bxslider"> block of code. By removing this block of code, the <img> tags will not be present and so the total time to finally display the page will be lessened. On the other hand, if you just want to hide it on a mobile skin, we can create a simple CSS rule: .bxslider { display:none;} To hide it on a responsive screen: The html in the document would be: <ul class="show-for-medium-up bxslider"> Getting back to not including it, we need a version of CubeCart that includes the ability to parse Smarty tags. In admin, Documents, click the edit icon for any document. On the General tab, check for the presence of the "Parse Smarty Tags" checkbox.
  21. Please remind us what skin(s) you are using? The solution could be different depending if you are using a responsive skin or a pair of non-responsive skins (a normal and a separate mobile skin).
  22. The backup file is (optionally compressed) a textual file containing all the SQL statements needed to rebuild and repopulate a fresh database. The fresh database can be a new/different database account/server, or the same database after the Restore process first TRUNCATEs all the tables. This is to say, the backup is not a copy of the actual binary files managed by the database server. The folder /admin_####/skins/default/templates/ is not the backup folder - it is the administration skin, but it and its contents are included in the backup. All backups should be located in Cubecart's /backup/ folder.
  23. The listing of the backup file may be a link -- so you may want to download it. You can, of course FTP it to your workstation, then delete it. Should you need to restore, it is now safely in your hands.
  • Create New...