Lorenzo Sfarra - News

Tech stuff, funny stuff, good stuff, hot stuff....stuff.
Nov 1
Nov 1

Migrate a large website to a new hostingwith FTP and CPanel (or similar) only

Recently I had to move a Magento 1.7 (if you are in a similar situation, please suggest to upgrade at least to Magento 1.9.X) website from a Linux server with SSH access to an hosting solution that has only FTP and a CPanel access. The first two parts are generic, the third is specific for […]

  Read more
Sep 1
Sep 1

Stripe Shared Customers

Introduction & Scenario In a Stripe Connect scenario, a customer who makes a purchase from one of your connected sellers shouldn’t need to re-enter their credit card or bank account details to purchase from another seller. Without Shared Customers, you will have to re-enter all the customer details, creating a Customer Object, on each connected account. With Shared […]

  Read more
Sep 1
Sep 1

Stripe Connect Custom with Direct Charges

Introduction & Scenario The scenario covers a reader (you!) that wants to: create a marketplace; take some fee on every transaction between users of its website/app and a connected vendor; guarantee a user-friendly experience for its vendors, in order to not let them front the procedures on the Stripe platform, but directly through its website/app […]

  Read more
Jul 0
Jul 0

PCI Compliance made simple

Are you trying to understand if your server has to be PCI compliant? Are you reading some docs around and the more you read, the more you are confused? Here’s some very simple and short tips for PCI compliance, according to Braintree and SecurityMetrics sources (you should check with your payment gateway / Qualified Security […]

  Read more
Jun 0
Jun 0

Magento2 API: get product details by ID or URL key

So, you are using the Magento2 APIs and you need to access a product. The core API forces you to access product by its SKU: GET /V1/products/:sku Sometimes you need to access a product by its ID, or by its URL key. Let’s see how we can create two simple APIs to perform this task. First […]

  Read more
May 0
May 0

Magento2 database transactions: how to save multiple model instances

Sometimes in your logic you have to save different model instances at once. Magento1 already had the concept of transaction, using the classic singleton model: Mage::getModel(‘core/resource_transaction’) Magento2 has its concept of transaction, too, so let’s see with a simple example how to use this feature. Let’s say we have a DB table ‘table’ described as […]

  Read more