Jump to content

bsmither

Member
  • Content Count

    16,261
  • Joined

  • Last visited

  • Days Won

    528

bsmither last won the day on June 1

bsmither had the most liked content!

Community Reputation

1,491 Excellent

Profile Information

  • Gender
    Male
  • Location
    Pacific Coast

Recent Profile Visitors

91,605 profile views
  1. This would require some modifications to the checkout pages (removing form fields, changing core code to not check for missing data, etc) -- but entirely do-able. You should verify that the payment gateway does not require an address for any sort of credit card verification to match the card's billing address.
  2. Have CubeCart make a backup of the database, then restore it on a different CubeCart installation. You may need to remove a number of the tables from the SQL file if you don't want the customers, sales, etc.
  3. You may have an ad-blocker enabled. At some point in the history of the ad-blocker (or maybe even the browser itself), there has been applied a CSS rule that hides hundreds of known classes and other designations. In the template element.social.php, the <ul> tag has a class of "social-icons". This is one of the many names that the ad-blocker is looking for and will stop the display of the HTML node that has that class. Please do not edit the SVG file.
  4. You can create a snippet using the hook named class.cubecart.display_homepage, and for the PHP code, use a slightly modified version of the code that gets the Homepage document: <?php if (($home = $this->getDocument(99)) !== false) { $GLOBALS['smarty']->assign('DOCUMENT_ALT', array( 'title' => $home['doc_name'], 'content' => $home['doc_content'], 'hide_title' => $home['hide_title'] )); } You will need to know the the 'doc_id' of the alternate homepage document (replace 99), and in the Mican skin: Replace: {if isset($DOCUMENT)} <div id="announcem
  5. In line 5 of the snippet, ask to get everything instead of just 'filesize' in the call to select() -- although there isn't much more to get other than the mimetype. The following is just part of line 5: ...select('CubeCart_filemanager',false,... If it is more desirable to simply get just the filesize and mimetype, then instead of 'filesize', use array('filesize','mimetype'). The next thing about line 5 is that the select() function returns an array of arrays. So, specifying the element [0] is proper. But, we may decide to incorporate everything returned in element [0] of the s
  6. The better place to make this adjustment is in the snippet shown in the first post. Add this statement after line 5: addean2receipt_item['filesize'] = formatBytes((int)addean2receipt_item['filesize'],true); But, now that you mention you want to do this in the template, I need to clarify one important point: Smarty, by default, does not allow the use of any userland functions, and the Smarty documentation says that only a few of PHP's functions are allowed to be used (although, I seem to be able to use any PHP function that I need). The developer must specifically enable a Smarty securit
  7. "What I need is that the user will only enter the image from the image/file/manager and this then will be the images that are displayed via the bxslider." That is my suggestion made in the last paragraph in my post above.
  8. Just call it. The function formatBytes() is a general (globally-available) function and is located in /includes/functions.inc.php. CubeCart executes this file early in the wake-up cycle and all the functions in it are then known to CubeCart and can be used anywhere at anytime.
  9. I am currently creating a bug report where CubeCart is deleting all HTML comment tags in the POSTed email template content. This is not desirable. As such, you will not see: <!----> <!----> in the final HTML. (Still, you will not see the unwanted Discount row.)
  10. Yes. Yes. But when viewing the email, the HTML comment tags do not show - just like HTML comment tags do not show in a web page.
  11. Wrapping the {if} tags in HTML comments would look like: Template Code: <!--{if !empty($DATA.discount)}--> <tr> <td>&nbsp;</td> <td> Discount:</td> <td> {$DATA.discount}</td> </tr> <!--{/if}--> Final HTML should $DATA.discount be empty: <!----> <!----> But earlier we learned that $DATA.discount is never empty - having a currency symbol, etc. But also as mentioned earlier, we can massage the string to be empty if it really is by using: {if !empty($DATA.discount|filter_var:FILTER_SANITIZE_NUMBER_INT|intv
  12. CubeCart adds the HTML comment tags to the {foreach} tags when assigning the content to the CKEditor textarea, and then removes the HTML comment tags from the {foreach} tags when processing the editor's content POSTed back by the browser. The reason is that CKEditor is very particular about a web page structure. One of the editor's structural enforcement is that there cannot be any content between the parts of a table structure. The {foreach} tags are disallowed content. Unless that content happens to be HTML comments. So, again, CubeCart removes those HTML comment tags from the encl
  13. There is CubeCart's formatBytes(x,implode=false,dec=2) where x is the byte count, implode is true to fetch a string, array otherwise, and dec is the number of characters after the decimal point. The function will return a string that says "2.45 MB". (Or KB, MB, GB, depending how large the number is.) Or will return an array with 'size' and 'suffix' elements.
×
×
  • Create New...