Jump to content

bsmither

Member
  • Posts

    18,049
  • Joined

  • Last visited

  • Days Won

    607

Posts posted by bsmither

  1. In my opinion, none of those would affect the calculation of a discount. (Except maybe Duplicate Order Emails if it touches the discount calculations or even perhaps makes its own calculations which reverberates against the Cart class property.)

    In the file /includes/global.inc.php, find:

    $glob['safe_mode'] = false;

    Temporarily, change to:

    $glob['safe_mode'] = true;

    and save. (You may need to disable the file's 'read-only' state to make the edit.)

    Determine if that makes any difference.

    Setting Safe Mode to true will inhibit plugins and code snippets from running, without actually disabling them -- seeing as there are many installed.

    If this does make a difference, then the task is to find out which one is causing the anomaly.

  2. I could not reproduce this on CC655, so I will try it on CC653.

    To verify the sequence:

    Create a promo code for 25% and have it assigned to one specific product. No other limits or settings are set.

    Add any other product to the basket.

    View the basket.

    Enter the promo code and click Apply.

    Note that CubeCart issues a warning that this code cannot be used.

    Click Continue Shopping.

    Add the eligible product to the basket.

    View the basket.

    Enter the promo code and click Apply.

    Note that the discount equates to 25% of the total of the price of the non-eligible product plus the price of the eligible product?

  3. Is the sub-domain still located at the original hosting account?

    And is the new domain located at a different hosting account? (Different server or different provider?)

    If so, it may be because there are plugins that require ionCube or specific versions of these plugins that match the version of ionCube installed (where that version of ionCube is compatible with the version of PHP running your new account).

    Do you get the administration login screen?

     

  4. If your skin is based on Foundation, then the vast majority of the CSS rules will be in the skin's /css/foundation.css file.

    For what Foundation does not provide, there might be additional CSS rules in cubecart.default.css (where 'default' may be some other sub-style name) that implement any customizations.

    Then there are a few random styling tags in the templates themselves. For example, in content.category.php, the {$subcat.cat_name} is enclosed in <small> tags.

     

  5. If using the Foundation skin:

    Find in the template main.php:
    
    <div class="large-3 columns show-for-large-up" id="sidebar_left">
      {include file='templates/box.featured.php'}
      {include file='templates/box.popular.php'}
      {include file='templates/box.sale_items.php'}
    </div>

    This is the right-side sidebar (regardless it says 'left').

    You can put the javascript just below the opening <div> tag.

    Let's look at the box.featured.php template. All the code is wrapped in a <div> block with a class="panel" styling. So, if you want your cameo to have a similar styling, wrap it using that <div> code.

    Note that it says 'show-for-large-up'. That means when viewing the site on a mobile or pad device, the screen width will be less than 'large' and thus will not show.

  6. A security feature of the forums will block what looks like whatever might be an attempt to inject malicious stuff. Otherwise, code can be posted - and best if using the Code Edit feature of the message editor.

    So, this is a "cameo", meaning it relies on data being fetched by the browser when running javascript code in the browser, ignoring anything that is happening or showing elsewhere on the page.

    Therefore, you can add the code directly to the appropriate template. One rule that MUST be followed as javascript uses braces: there MUST be whitespace on the insides of braces. For example:

    What not to do:
    var x={"Hello":"World"}; // no whitespace inside braces
    
    What must to do:
    var x={
           "Hello":"World"
          }; // whitespace inside braces - could also be a space or tab

     

  7. If the widget is a stand-alone "cameo", then adding the HTML to the template code would be easiest. It would be best to make a copy of the skin you want to use and modify that copy. You can also create a plugin that will add javascript to the skin code, which in turn will add the necessary HTML to the DOM.

    If the widget wants to use specific data fetched and custom processed by CubeCart, to be displayed in the widget, then a plugin would be needed. Displaying data already fetched and processed by CubeCart from an earlier process might make needing a plugin not necessary.

  8. MySQL (and by extension, MariaDB) can have more than one index, of various types, applied against a specified column, as long as they are named differently.

    For example, I just ADDed a KEY index to CubeCart_filemanager, 'md5hash' column, but named the KEY index "Index6" (being the sixth index applied).

    Following the program flow of maintenance.index.inc.php, near lines 987-1003, the loop will find the 'Non_unique'=='0' on 'md5hash' first, but then will find else 'KEY' on 'md5hash' on a subsequent iteration of the loop.

    So, the listing of tables will flag CubeCart_filemanager as having KEY (not named "md5hash") but expecting UNIQUE KEY -- even though there is, in fact, a UNIQUE KEY on 'md5hash'.

    Maybe this database needs to be looked at using an external database utility to discover what indexes are actually on CubeCart_filemanager.

  9. For 2 above, make this edit:

    In element.product.call_to_action.php
    
    From:
    
      <div class="text-muted"><small>{$LANG.catalogue.min_purchase_quantity|replace:'%s':$PRODUCT.minimum_quantity}</small></div>
    {/if}
    {if $PRODUCT.maximum_quantity gte $PRODUCT.minimum_quantity}
      <div class="text-muted"><small>{$LANG.catalogue.max_purchase_quantity|replace:'%s':$PRODUCT.maximum_quantity}</small></div>
    
    To:
    
     <div class="text-muted"><small>{sprintf($LANG.catalogue.min_purchase_quantity,$PRODUCT.minimum_quantity)}</small></div>
    {/if}
    {if $PRODUCT.maximum_quantity gte $PRODUCT.minimum_quantity}
      <div class="text-muted"><small>{sprintf($LANG.catalogue.max_purchase_quantity,$PRODUCT.maximum_quantity}</small></div>

     

  10. "the real issue is every time you press the add button to add a new row, the product is added to the basket as if you wanted to purchase"

    The <button> tag, by default, will "act" the same as a <input type="submit"> tag - specifically if it is inside a <form> block - which it is when part of the product description.

    Try <button type="button"> which makes it do nothing (the onClick() will make it do something).

    Note: there are syntax errors:

    placeholder="1"size="4" :: there should be a space between the attributes
    <tc style="width:20%">Grand Total</tc> :: do you mean <td> tags?

     

  11. Probably not, unless you installed CC655 somewhere (other than actually upgrading CubeCart to CC655), then editing the includes/global.inc.php file to point to the existing database.

    If you did, in fact, run the CC655 setup (upgrade) script, CubeCart would have seen the current database schema was at CC653, which would have caused the execution of all the SQL statements in /setup/db/upgrade/6.5.4.sql and 6.5.5.sql.

    Depending on the above, please determine if the SQL statements in these two files need to be sent to the database.

     

  12. Indeed.

    I wonder if that is the case with Claudia - the upgrade at CC654 failed to execute that statement in the SQL upgrade file because the database found duplicate MD5 hashes? (I need to remind myself what sort of error reporting is shown after an upgrade for errors triggered during an upgrade.)

     

  13. In admin, Maintenance, Query Database (Advanced) tab, in the Query Box, enter:

    ALTER TABLE `CubeCart_filemanager` ADD UNIQUE(`md5hash`); #EOQ

    Then click the Go button. There will be no response shown.

    Let us also take a look at admin, Maintenance, Upgrade tab. What is the highest version shown (should be the top-most line of the History table)?

     

     

     

  14. It is strange that Cubecart_filemanager.md5hash (of your installed database) has no index currently assigned to it.

    The upgrade sequence against the database added a UNIQUE index to this column at the CC654 version.

     

  15. CubeCart's admin, Maintenance has a hard-coded list of what CubeCart expects the database structure (its "schema") to look like. That hard-coded list has Cubecart_filemanager.md5hash having a UNIQUE KEY index.

    So, to quiet the orange warning, the database table CubeCart_filemanager should have a matching UNIQUE KEY index applied against the 'md5hash' column. Applying any other kind of index will not quiet the orange warning.

     

     

  16. I haven't experimented with this, so I do not know all the setup required, but a Promotional Code can be created with a Fixed Price value. At the bottom of the "New Promo Code" form is a GC Conversion option.

    Find an order made by the winner and use that order number (standard order format - not custom format) for the conversion field. Supposedly, the balance of the "coupon" will be retained for future purchases.

     

     

×
×
  • Create New...