Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by stevebo

  1. Thanks for the tip!  Near "Update Subtotals" I see the line

                    if($product['price']<0) $product['price'] = 0;

    and can just comment it out. I'm not sure about the tax class and other items you're looking into however although I guess I can see that a tax applied to a negative amount will give negative tax (which seems like it makes sense so that people pay tax on only what they are charged).

    I also looked a bit further down the code and found:

                if ($this->_total < 0) {
                    $this->_total = 0;

    so it looks like even if I order so many discounts that the total is negative, the total will still get set to zero.  I will happily change this code in my own installation, but I don't know if this is a feature that would have more widespread appeal or if there's something else I'm not considering.

    What do you think?


  2. Yes, there is a complicated matrix of conditions that determine a customer's loyalty discount.  The "loyalty discount" can be any $50 increment between $50 and $700 depending upon how often a customer has purchased from us before, information CubeCart can't possibly know without linking to the website's database at a minimum.

    There are also referral discounts available to customers who refer others to us.  This also starts at $50 and is unlimited up until the full price of the cart.  We won't start paying people if their discounts are higher than the price of their shopping cart though.

    We also run a 3-Day sale once a year whose discount is either $50, $100 or $150.

    So it's a complicated matrix of conditions which Cubecart has no way of knowing about.  I'm OK with leaving the discount in the hands of the customer (even if they get it wrong sometimes).  But when they get to the checkout screen, the -$1 discount item (of which a customer may "buy" 100 to get a $100 discount) shows a unit price of $0.00 instead of -$1.00.  

    I can probably take time to find and alter this in the PHP code and upload it to GitHub but I'm not certain it's a desirable feature for everyone.  I'm not crazy about hacking up the code only for my store because the next time I download the latest code updates from GitHub, I'll end up overwriting my changes or they will at least be out-of-sync.

    What are your thoughts?


  3. I've got another issue.  Although I can create a product called Discount that costs -$1.00, and that it appears to work just fine when I click on "Your Basket" at the top right, when I go to checkout, the unit price of the discount is changed to $0.00 which kind of defeats the purpose.

    I suppose it's a way of making sure the Gateway doesn't allow people to withdraw money from my account by charging -$50 or whatever, but do you know a work around?

  4. This may be a question for Braintree, but I've integrated the Braintree extension in my shopping cart since it's the recommended extension for PayPal.  It works just fine.

    Is there a way to disable the credit card portion and display a button for PayPal only?  I do realize that people can use their credit card via PayPal, but I don't want to show the Braintree Credit Card Gateway.

    I figured I'd just install the PayPal extension (v. 1.0.8) instead, but when I do I receive the following error from the PayPal gateway:

    Things don't appear to be working at the moment. Please try again later.

    Is there something I'm missing?



  5. I guess I should explain the discounts.  I have these two items in my shopping cart

    • Discount (-$1)
    • Adjustment ($1)

    Customers figure out their own discounts and select the corresponding adjustment using these shopping cart items. Sometimes they apply an incorrect discount.  If you'd like further explanation of why the onus is on the customer to adjust their totals, you can see the details of the discounts Here or Here.  The shopping cart just doesn't know who gets discounts and how much.  I could probably write this into the MySQL database and hack up the code to reflect the correct discount, but that's a project for the future.

    I read somewhere along the way (that I can't seem to find anymore) that I can adjust a ticket up to 25% or something like that before settlement.  And sometimes people overpay so I want to adjust the amount before it goes to settlement.  My bankcard processor does NOT refund any fees when I issue a refund, so I like to get it right before settlement.  This may be something to take up with the Gateway, but I thought there might be a way to "intercept" the transaction in Cubecart.

    PS:  I'm using Authorize & Capture.  Should I instead use just Authorize in order to make adjustments?

  6. How can I manually adjust a payment?  My Cubecart setup uses an Authorize.net extension (hacked up to work with Payeezy) in "Authorize & Capture" mode.

    My store offers combinations of discounts that customers don't always get right, sometimes in our favor sometimes in their favor.  I would like the ability to adjust their payment before settlement.  How do I do this?  Do I do it in Cubecart Admin or do I have to go to the Gateway company?  I imagine the mechanism is a lot like adding a tip onto a restaurant bill.




  7. That did it!  The error logs were empty or not useful, but the debugging statement in the knowledge base aricle ini_set('display_errors', true); worked.

    The error message it displayed indicated that the system was trying to open a file that did not exist.  When I examined the file name, I saw that it referred to my old hosting company that I migrated the installation from.  Further digging showed that I migrated over a bunch of cache files and Cubecart was using those.  I deleted everything in the cache and not only did the blank screen go away, the gateway screen successfully loaded!

    Many thanks for your help!


    PS: As an aside, I find that while caching is really useful in a production environment, I really have to watch out for it when developing / testing.  The browser cache has particularly been a thorn in my side.

  8. I'm actually using Payeezy which I got to work on my website.  However, I am migrating the entire website along with Cubecart to a new hosting company.  I am able to get everything to work except the gateway (which is working on my existing website).

    I've been on with tech support at the new company for a half hour and they submitted a ticket about mhash, so I have no answer yet.  

    It feels like some setting somewhere is off.  Whether I have to generate a new admin_xxxxx.php or set something in global.inc.php or have to set up something in the Cubecart management dashboard.  I just can't quite get it (even though it works on my live website).

  9. When I hit the Checkout button from my CubeCart's confirmation screen, I am taken to a gateway page that is completely blank.  There is nothing in the Admin's error log nor Transaction Log.

    However, it does show up as a pending order in Customers > Orders.

    Not only do I receive a blank Gateway screen, I get no confirmation emails, even though the SMTP email test works fine.

    What am I missing?

  10. That was the missing piece!  When I imported the MySQL database from one server to another, MySQL prepended 'cbe' on the imported table names, leaving the existing tables such as CubeCart_Inventory as well creating new tables such as cbeCubeCart_Inventory.  To fix this, I just changed the line in global.inc.php to

          $glob['dbprefix'] = 'cbe';

    and everything seems to have worked out.

    As an aside, my new hosting company (HostGator) has a 1-click install, which installed version 5.2.16.  I did this because it was easy and seemed to work, but the shopping cart I had already created didn't work.  I had created a shopping cart and tested everything on my old host using a 6.1.13 installation which did not seem to work very well with the v5 database, so I discarded v5 and manually installed v6.  And it somehow seems to work!

    Now I just need to go back and try to get the gateway working again on my new installation.

    Many thanks for all your help, I am certain I could not have gotten this far without you.




  11. Just to complicate things while my ISP is working on the error...

    I installed Cubecart on the Fitpacking installation of my new hosting company.  It's obviously still in test mode.  The new Hosting company has an install button on their cpanel so I just installed it.  The install version they have is 5.2.16.

    I can successfully install it, but once again even though I have migrated the store over to the new database (referenced in global.inc.php) and can see all the items when I browse in PHPMyAdmin, the new store's admin panel shows only the test category and test product.  Once again, I cannot seem to link up the database with the store.

    I must be missing something truly basic.  Any ideas?  I feel like I've come so far, but it never truly works.

  12. I started messing around with global.inc.php and now I'm completely locked out.  I don't even know how to re-install at this point since the setup portion has already been performed and I can't even get an admin login screen anyway.

    Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'ssilberberg'@'' (using password: YES) in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 33

    Warning: mysqli_options(): Couldn't fetch mysqli in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 35

    Fatal error: Access denied for user 'ssilberberg'@'' (using password: YES) in \\NAWINFS04\HOME\users\web\b2754\rh.fitpacking\CubeCart\classes\db\mysqli.class.php on line 38


  13. I have 2 domains hosted at the same hosting company, but I believe they are hosted on different machines / IIS servers.

    With your help, I was able to get the first domain, Fatpacking.com up and running.  The cart works fine, the database is populated and I can connect to both a test and live gateway for payment.  So awesome!

    I have a 2nd domain, Fitpacking.com hosted at the same company but on separate machines (I believe).  Using PHPMyAdmin, I exported the MySQL DB from Fatpacking and then imported the DB into Fitpacking.  I used different database names, usernames/passwords just to make sure I could differentiate between the two installations.

    I uploaded a clean Cubecart install into Fitpacking and logged in as administrator.  I had to get tech support at my ISP to get the database connection working.  I had to do this for Fatpacking as well, so I do know it can work.

    This gave me a "good" global.inc.php and a fresh admin_xxxxx.php.

    When I opened the Fitpacking shopping cart, I expected to be able to see categories and products because they were in the uploaded database.  But I couldn't see them even though I can see the products when browsing through the database.

    I figured that images still needed to be transferred and maybe some other connectivity stuff was hiding in the file system so using FTP, I uploaded the entire Cubecart installation from Fatpacking to my machine and subsequently uploaded it to Fitpacking.  I attempted not to overwrite the new admin stuff, global.inc.php and admin_xxxxx.php as well as the admin_yyyyyy directory.

    Unfortunately, I still can't see anything other than the "fresh" install with a test category and a test product.  Just for the hell of it, I added another test product.  Although I see it when I visit the store, I don't see it in the Fitpacking database nor the Fatpacking database.  It is absent in both.  I can't for the life of me figure out where cubecart is storing this new product.

    Any ideas?

    Thanks, Steve

  14. I have Cubecart installed and working for one of my domains.  I am trying to copy the entire installation over to another domain but am having problems.

    I was able to export the product list (and all the tables) from Domain 1 and import it all into Domain 2.  

    However the Cubecart admin can't see the new database (nor the old one).  How do I "link" them up?  I looked at global.inc.php and it reflects the new hosts settings.

    PS:  I have not moved the files over yet (like product images for example) because I don't want to wholeheartedly overwrite the entire new Cubecart installation and don't really know what's safe to overwrite and what isn't.

    Any ideas?

  15. If you a Cubecart user who needs to integrate with the Payeezy Gateway, here is how I did it.  Hopefully, this guide will be useful to you. Much of this guide’s content was provided by bsmither with some help from njohn and in other threads around the web.

    Note:  I have not yet, "gone live" so who knows what other bugs may be out there waiting for me?  But this should get you connected to a test Gateway.

    Although Cubecart officially says it doesn’t work on a Windows Server, I was able to get it running on one.  I have tried to denote these steps with WINDOWS SERVER ONLY.

    Cubecart comes with many free gateway “extensions” which install the code necessary to link your Cubecart shopping cart with a Payment Gateway, for example Stripe or Paypal.  One of these is Authorize.net, which is the extension used to connect to Payeezy.

    Don’t get fooled by the First Data extension.  Even though First Data and Payeezy are somehow the same (but different?) installing the First Data extension just seems to generate errors. I wasn’t able to get it to work anyway, maybe you can.  As an aside, I cannot for the life of me determine whether Payeezy and First Data are one and the same, somehow related or not related at all.

    Step 1 (Cubecart side):

    • Enable the Authorize.net SIM extension: https://www.cubecart.com/extensions/payment-gateways/authorize-net-aim-sim
    • Click the lightning bolt
    • Copy and paste the token into Extensions > Manage Extensions > Token on the Cubecart admin
    • Click Go to install
    • Under Available Extensions, Authorize.net should now appear.  Check the Status box and click Save to make it “live”
    • Click on Authorize.net (Dashboard > Manage Extensions > Authorize)
    • Make sure Mode is SIM unless you are writing your own Payment API (along with all the PCI security codes – who’s got the life force to do that?) in which case you’d choose AIM
    • Check Test Mode (Eventually uncheck and save when going live)
    • You will need to provide an API Login ID and a Transaction Key.  You can’t do this until you have set up a Payeezy Gateway Account (Demo account to figure this all out, but eventually a live working account).
    • On the Payeezy Gateway Side:

    Step 2 (Payeezy side):

    • To establish a Demo Account. Register for a Demo Payeezy account at:   https://provisioning.demo.globalgatewaye4.firstdata.com/signup
    • Once registered you will receive welcome emails with your Demo Login Credentials.
    • You should choose Hosted Checkout (HCO) unless you want to write your own Payment API with all the security issues that come with it.  HCO allows you to press a submit button from the Cubecart Payment Confirmation page and leave the actual credit card entry page up to the Payeezy Gateway.
    • Cubecart’s free Authorize.net extension sends all the information and fields that the Payeezy Gateway expects such as price and merchant ID (your store name) in order to process the transaction.
    • Next, we’re going to link your Payeezy Demo Merchant Account with Cubecart
    • Log into Payeezy
    • Go to Payment Pages
    • Click on Payment Page ID
    • Choose 10. Hash Calculator
    • Copy x_login and transaction_key into Cubecart > Dashboard > Manage Extensions > Authorize > API Login ID & Transaction Key
    • Click Save
    • Now you are ready to modify the Authorize.net code so that it works with Payeezy.  

    Step 3 (Cubecart again):

    Change the following code on the server in the file <cubecart folder>/modules/gateway/Authorize/gateway.class.php

    $this->_url = $this->_module['testMode'] ? 'test.authorize.net' : 'secure.authorize.net';
    $this->_path = '/gateway/transact.dll';

    Change to:
    $this->_url = $this->_module['testMode'] ? 'demo.globalgatewaye4.firstdata.com' : 'checkout.globalgatewaye4.firstdata.com';
    $this->_path = '/payment';

    Also: You must capitalize CC and PAYMENT_FORM in <cubecart folder>/modules/gateway/Authorize/gateway.class.php as specified here: https://support.payeezy.com/hc/en-us/articles/204686725-First-Data-Payeezy-Gateway-Payment-Page-Field-Validation

                    'x_method'                => 'cc',
                    'x_method'                => 'CC',

                    'x_show_form'            => 'payment_form',
                    'x_show_form'            => 'PAYMENT_FORM',

    WINDOWS SERVER ONLY: add the following code to Web.config:

    <!--This is for Cubecart!!!-->
          <httpErrors errorMode="Detailed"/>
                   <rule name="rule 1R" stopProcessing="true">
                   <match url="^cubecart/(.*)\.html?$" />
                   <action type="Rewrite" url="/cubecart/index.php?seo_path={R:1}" appendQueryString="true" />


    One other issue you might have on a Windows Server is that index.php isn’t recognized as a start page.  You can easily create a page that loads automatically that transfers control over to index.php.  So create a file called index.html consisting of the following code.  If it’s not obvious, make sure to replace YourDomain with your website’s domain name and <cubecart folder> to the directory where you installed Cubecart.

    <title>[Your shopping cart name] Shopping Cart</title>
    <meta http-equiv="refresh" content="0; URL=http://www.YourDomain.com/<cubecart folder>/index.php">
    <meta name="keywords" content="automatic redirection">
    If your browser doesn't automatically go there within a few seconds, 
    <a href="http://www.YourDomain.com/<cubecart folder /index.php">Click Here</a>.


    I’m sure there’s stuff I’ve forgotten.  For example when debugging Cubecart it helps to refresh your browser after every change you implement.   But I hope this is useful for someone else who wants to do the same integration.

  16. OMG Success!!!  Thank you both so much for all the help!  This process was way more involved than it seems like it should be.  I am going to post the steps necessary to make it work so that the next person can integrate Payeezy with Cubecart.  But for the moment, I'll post the receipt


  17. Update, I've had some success!!!!  I removed the extension and re-installed it to get it to work.

    Now I am apparently getting through to the Gateway, but receive this

    Unable to proceed with payment

    We cannot proceed with payment because of technical difficulties.
    Please try again later

    Hosted Checkout Test Assistance

    Hosted Checkout test mode detected.

    Hosted Checkout uses security mechanisms to block repeated payment attempts. During integration with Hosted Checkout these may interfere with development and testing from time to time.

    The result is that you may see this page, independently of whether your shopping cart, or other integration server, is configured properly.

    To continue testing and developing your Hosted Checkout integration, you should try following this link to reset your session.


  18. Here is the store: http://www.fatpacking.com/cubecart/index.php

    When I get to the final checkout, http://www.fatpacking.com/cubecart/index.php?_a=confirm and click the checkout button, I am brought to http://www.fatpacking.com/cubecart/index.php?_a=gateway to enter Credit Card info.  Unfortunately, before I can do anything, the cart redirects me to test.authorize.net and I'm served the error.

    I'm pretty sure that the cart is caching this from a prior session when I was trying various things.  I have found that any time I change either the cart set-up configuration or any of the .php code that I have to refresh (F5) each page for the changes to take place.

    If I could only refresh the gateway page, I think the error might go away although I don't know.    I am attaching gateway.class.php.  I actually messed around with it a bit so it's possible that I deleted or altered something important, but I don't think so.



  19. Oh no, I'm not sure what I did, but now it's trying to redirect me to test.authorize.net instead of demo.globalgatewaye4.firstdata.com.  I don't even get to a credit card input screen.

    There is no reference to test.authorize.net anywhere in the cubecart / Authorize codebase.  I do see authorize.net referred to in config.xml and language\module.definitions.xml however.

    There might be some weird caching thing going on that latched onto test.authorize.net while I was trying various things, but I've cleared the browser cache and refresh every page.

    Maybe you have some suggestion because this makes no sense at all.


  20. This is great!  With your help, I'm almost there. I am successfully transported to a gateway screen to fill in credit card info.  When I fill it in and submit,  I now receive this:

    The following errors were detected:
    The merchant login ID or password is invalid or the account is inactive.

    I'm not sure how the credentials are passed.  It would seem like a bad idea to hard code them into the .php code.  Any ideas?


  21. On 3/27/2016 at 11:43 AM, njohn said:

    LinkPoint Basic

    Connect 1.0 product is no longer supported. Please contact your account representative

    Any other advice you can give me to get set up like you did?  I have been through the same frustrating exercise of getting the above error and am at a loss as to how this all works.

  22. On 3/27/2016 at 8:10 PM, njohn said:

    AHA - Now I remember where I saw use auth net 


    At the very beginning it says "CubeCart can be connected to Global Gateway e4 (GGe4) by modifying the Authorize.net SIM Module."

    Then gives precise instructions on what/how to do DUH


    Hi NJOHN,

    I cannot seem to log into Zendesk.  Is there any chance you still read these forums and can send me the contents of that link?




  23. OMG it works!  But now I can't get it to fail the way it has been failing.

    I blame my browser cache.  I discovered this when I noticed that when checking out, Cubecart stopped prompting me for customer info and populated the screen with my previous order's information.

    So now every time I make a change to the admin panel, I make sure to refresh the browser for each page of the Cubecart system.  This seems to work and as I mentioned, I now cannot get it to fail.

    I really appreciate all your help.  Can I send you some kind of gift card?


  • Create New...