Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by bsmither

  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.
  14. I have a plugin "Additional Product Fields". So, this would be a specific solution for you as opposed to a general incorporation of this feature in CubeCart's core code. The added product fields can be whatever you want. One field for the minimum and a second for the maximum, or a single field for a specifically formatted 'range'.
  15. "I do not really want to have anything specific to a given shipping company, in the payment gateway." Ah! Of course. If we can't determine with any accuracy what any given shipper can promise for shipping delivery characteristics, maybe we can state generally, on a per-product basis, that "This product could take 3-5 business days to arrive." where '3-5' is settable per product. The gateway module can iterate across the basket contents and use the largest shipping time found.
  16. This bug report has an interesting comment: https://bugs.php.net/bug.php?id=64211
  17. The strings you are comparing are not hexits. The following is an example of a hexit from hash_hmac (using false for the third parameter): b8e7ae12510bdfb1812e463a7f086122cf37e4f7 We can make tests on the base64_encode function later.
  18. We can be reasonably sure that we know what $concatenated_string and $certificate is. Those variables can be var_dumped in your experiments. Next, we can do: $hexits = hash_hmac('sha256',$concatenated_string, $certificate, false); var_dump($hexits); Note the false argument. This will give you a string of the hashed output expressed as hex bytes. With this, you may be able to compare a hexit result from the DevGlan site. If the two hexit strings match, then we can look at the base64_encode function's output.
  19. What I am reading in your observation, is that adding a new character (a quote) into $concatenated_string, you are expecting the same sha256 result as the string without that newly added character? (I am ignoring the base64 encode for the moment.)
  20. Ok, in this case, $TAXES may exist, but it will be an array with zero elements - that is, nothing was found in the tax tables that could apply, but the array might have been established in the core code ready to accept a tax on this, and a tax on that, and another tax on something else. It's just that nothing was found to apply a tax to. So, Smarty's {foreach} didn't find any elements in $TAXES and so didn't work through the looped code. That's not the same as $tax_total, a distinct value (known as a 'scalar' value), which we can say is not empty. And, I do not see in CubeCart's
  21. Welcome Danny_cz! Glad to see you made it to the forums. CubeCart will create the entire Top Nav Bar and cache it. This saves a lot of time - especially if the Nav Bar contents do not change. When getting everything ready to be displayed, the cached Top Nav Bar is given to the Smarty variable $CATEGORIES. The box.navigation.php template tests for $CATEGORIES and will incorporate that (already-compiled HTML) into the final page, instead of compiling the <nav> block. $CATEGORIES does incorporate $NAVIGATION_TREE. However, let's look at /classes/gui.class.php, the private fun
  22. I tested with this: {if !empty($DATA.discount|filter_var:FILTER_SANITIZE_NUMBER_INT|intval)}
  23. If the fields are still showing, then it would be my thought that $DATA.discount and $DATA.total_tax are not empty. Please try to view the actual sent email in its HTML form. You may be able to get this by viewing the email in the admin, Email Log. Then asking your browser to show you the source of the colorbox overlay. (Or ask your email application to show you the source.) A recent email in my system shows this: <tr> <td>&nbsp;</td> <td>Discount:</td> <td>$0.00</td> </tr> Please observe that $DATA.discount is not
  • Create New...