Jump to content

bsmither

Member
  • Posts

    17,973
  • Joined

  • Last visited

  • Days Won

    603

Everything posted by bsmither

  1. The aforementioned statements have characters in them that confuse the proper HTML display of them. Specifically, the characters that follow what appear to be the truncation location are: <= I.stock_warning ... We will assume the statements are correct. (A bug report has been submitted.) Also, note statement 24: the time shown may be confusing to all except scientists. The E-5 scientific notation makes this value very small. The bug report is: https://github.com/cubecart/v6/issues/1354 If you wish to make this edit yourself: In classes/debug.class.php, near line 201, find: $this->_sql[$type][] = '<span style="color:#'.$colour.'">'.htmlentities(strip_tags($message).' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>'; Change to: $this->_sql[$type][] = '<span style="color:#'.$colour.'">'.htmlentities( $message.' ['.$tag.']', ENT_COMPAT, 'UTF-8').'</span>'; // strip_tags($message)
  2. SQL statements 22 and 23 are not complete. Specifically: ... AND (((I.stock_warning > 0 AND M.stock_level [NOT CACHED] Note that there are three open parens with no matching closing parens, and missing any kind of limit. These statements should have shown as SQL errors in a list just following the SQL Statements list. I will look for where these SQL statements are constructed.
  3. Is there a web address we can see this happening? In your first post, you show that the content appears above the <!doctype html> tag. In the vanilla skin, it appears just after the <body> tag, withe the ColorBox javascript then later adding its code just after the <body> tag.
  4. You are saying this is appearing in more than one skin. The top image looks like Vanilla, and the second image is probably a Foundation or Foundation clone. In the first image. I see that the rogue content is showing in the HTML source immediately after the ColorBox code (added by the ColorBox javascript plugin), and just before the <div id=page_wrapper"> statement in the template. The second image, I presume that the rogue content is at the very top of the HTML source. But CC6 does not process a skin any differently depending on the skin. I cannot explain why this content would appear in different places.
  5. Depends how much 'permission' the intruder (if that is what happened) was given. For example, using the file editor tool in a hosted account's control panel (Cpanel) has a lot of permission to make edits to files. In this particular scenario, almost all files are 'writable'. Also, an intruder (or script) can easily have the operating system reset the file's date/time stamp to make it appear that nothing was changed. Also, I believe CC6 is coded to not send any HTTP headers until templates have been populated with data and control is about to be turned over to Smarty to render and output the templates. If something is outputting rogue content (and received by your web browser), there will be some default headers sent prematurely. The consequence of that is that when PHP is told to send the real headers, PHP will complain about "Headers already sent". This complaint will show in PHP's error log and possibly in CubeCart's admin Error Log listing. However, if a skin template file has been compromised, there will be no "Headers already sent" error. Also, it will be somewhat unlikely that the rogue content would appear at the top of the screen. Examine the contents of box.basket.php, box.basket.content.php, content.checkout.php, and main.php. Examine everything.
  6. I think you have most of what you need. I think the last piece of the puzzle is 3.cubecart.validate.js, changing the rules to match phone: in the various locations as desired. Again, changing this page resource will require you to force your browser to fetch a fresh copy.
  7. Do these 15 or so products have a quote mark in their description?
  8. If you have just now upgraded, you should force your browser to reload the page resources: CSS, javascript, images. This is typically done with the keyboard shortcut CTRL-F5.
  9. One thing to keep in mind is that the web browser caches page resource files: CSS, javascript, images. So, your browser may be using the older cached copy of the javascript validation file. Often, using the keyboard shortcut CTRL-F5 will force the browser to fetch fresh copies of page resource files. CubeCart also has an internal cache of compiled template files. You may need to have CubeCart dump that cache. In admin, Maintenance, Rebuild tab, check Clear cache.
  10. Welcome zealon! Glad to see you made it to the forums. As a business practice, you would generally subscribe to the one payment processor that gives you the best rates and reliability for your business model. That said, CubeCart allows for any number of gateways to be enabled. During checkout, each enabled gateway will be presented in a list (plugins can restrict which gateways are available for cutomer group memberships) where the customer can select which processor is best suited for them.
  11. To me, it looks like someone (or some bad code) tried to get a listing from a search of some sort, and in the URL, specified a page number in the gazillions. It would satisfy my curiosity to trace it out. I would not worry about it.
  12. It seems the original line has no trailing semi-colon. That is not illegal if it is the last or only line within the braces, but does make for very poor programming practice.
  13. Welcome mhlai! Glad to see you made it to the forums. Please try this procedure. In admin, Documents, note the document tagged as the HomePage document. There will be a small white-plus in a green circle next to the Edit icon. That green circle is to create a 'child' translation of the 'parent' document.
  14. That snippet relies on the enviroment's installation of PHP having a direct connection to a server-installed mailer (like SendMail) so that the PHP function mail() will work. Not every server environment has a SendMail-like utility installed. The correct approach is to use CubeCart's incorporation of the PHPMail library. I suggest removing that snippet and go for the plugin I mentioned.
  15. Until Mozilla fixes this, here is a work-around: In the admin skin file print.css, near line 112, find: .page-break { page-break-after: always } Change to: .page-break { page-break-after: always margin: 1px; } It will be difficult to force the browser to reload page resources because in doing so, the actual page is reloaded. However, in calling this printable PHP page, there is a PHP statement at the end that deletes this file. So, we will make a temporary edit that will cause the browser to believe it needs to load the print.css file everytime, and not use the browser's internal cached version. In the admin skin template orders.print.php, near line 17, find: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css" media="screen,print"> Change to: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css?{$smarty.now}" media="screen,print">
  16. But it is not working? Probably should go with the other plugin. That snippet lacks sufficient merit.
  17. Definitely this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1404868
  18. I am sure there is. Is the snippet you have installed this one? https://www.cubecart.com/extensions/code-snippets/send-registration-confirmation-email There is also this: https://www.cubecart.com/extensions/plugins/registration-email-manager
  19. There are no tables in the invoice. The code is all proper. I will have to blame it on the latest version(s) of Firefox. In the meantime, maybe Cyberfox or Waterfox (respectable forks of Firefox) will suffice.
  20. The URL that ends with the fragment identifier #wherever could be pointing to the matching anchor <a name="wherever"> tag. The function of the fragment identifier is to do either of two things: 1. Have the browser scroll the page so that the location in the page where the anchor tag is located will be at the top of the browser viewport. 2. Under javascript control, amongst a set of hidden <div> panels (used extensively in admin), sets the CSS property of the div with that id to display:visible, commonly by clicking a tab control. In your example above, it seems there are two <div>'s with the same id value. We should try to get that fixed.
  21. I found this Firefox Forum conversation: https://support.mozilla.org/en-US/questions/1178162 I will examine the layout of the page and see if there is some sort of "nested table" type of issue.
  22. Some of the page is a pre-set size and position. If you look for "Burris Computer Forms" eCommerce Peel Out! Shipping Label Sheets, you will find that the shipping address block is strategically positioned. In addition to the browser's orientation, scaling, margins and header settings, there is also the computer printer driver's Print Dialog control panels that specify paper size, copies per page, choice of paper tray, etc. Some graphics-type programs can augment this or work directly with the printer driver settings to accurately print envelopes, greeting cards, business cards, etc, but usually do not leave these settings permanent.
  23. Create this snippet: Enabled: checked Unique ID: ordersumcustgroups@cubecart600+ Execution Order: 99 Description: Adds Customer Group Name(s) to Admin Order Summary Trigger: admin.order.index.display Version: 1.0 Author: forums.cubecart.com/topic/53037-orders-to-show-customer-group/ PHP Code: <?php $snippet_ordersumcustgroups = $GLOBALS['db']->misc('SELECT `group_name` FROM `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_customer_membership` AS M INNER JOIN `'.$GLOBALS['config']->get('config', 'dbprefix').'CubeCart_customer_group` AS G WHERE G.`group_id` = M.`group_id` AND M.`customer_id` = '.$summary[0]['customer_id'].';'); if (is_array($snippet_ordersumcustgroups)) { foreach ($snippet_ordersumcustgroups as $membership) {$member_groups[] = $membership['group_name'];} } $snippet_ordersumcustgroups_order['cust_groups'] = isset($member_groups) ? implode(',', $member_groups) : ''; unset($member_groups); $GLOBALS['smarty']->assign('CUST_GROUPS', $snippet_ordersumcustgroups_order['cust_groups']); Make this edit in the admin skin template: orders.index.php, near line 197, find: <div><label>{$LANG.common.email}</label><span><a href="mailto:{$OVERVIEW_SUMMARY.email}">{$OVERVIEW_SUMMARY.email}</a></span></div> On a new blank line after that, add: <div><label>{$LANG.customer.title_groups_membership}</label><span>{if $CUST_GROUPS}{$CUST_GROUPS}{else}{$LANG.common.unknown}{/if}</span></div>
  24. We would have to find a different hook to write a snippet against.
  25. bsmither

    Hooks

    There are a few approaches to getting debug/diagnostic data: 1. Add the following statement whenever you need to see the value of a passable-by-reference variable: $GLOBALS['debug']->debugTail($variable_to_examine, 'key'); where the key could be something like: 'orders.index.inc.php_510' This will show as a heading in CubeCart's debug section of the page. 2. Add the following statement whenever you need a phrase to be seen: $GLOBALS['debug']->debugMessage("Just entered the hook: " . $hook); In the debug section of the page, there will be Messages listed near the bottom. 3. I have developed my own diagnostics module. It allows for program code tracing.
×
×
  • Create New...