Skip to content

Instantly share code, notes, and snippets.

View daniloab's full-sized avatar
🎯
Focusing

Danilo Assis daniloab

🎯
Focusing
View GitHub Profile

RUNNING A LOCALLY WORDPRESS STORE

  • start apache
  • start mariabd

APACHE

  • the srv/http folder it is on root folder
  • sudo systemctl start httpd.service - run apache and look for http://localhost

MARIADB

  • sudo systemctl start mariadb.service - starting the server
<?php
$mageFilename = '../app/Mage.php';
require_once $mageFilename;
umask(0);
Mage::app('admin');
Mage::app()->cleanAllSessions();

Hi, there. Can anyone help me to understand why my checkout success page it is not showing on my magento1 store?

my module is OpenCart_Cart

my cart.xml inside of /app/design/frontend/base/default/layout/opencart/cart/cart.xml is:

<?xml version="1.0"?>
<layout version="0.1.0">
    <checkout_onepage_index translate="label">

select

  • SELECT * FROM eav_attribute WHERE attribute_code LIKE "%openpix%"
<?php
$setup = new Mage_Sales_Model_Resource_Setup('core_setup');
$setup->startSetup();
if (! $this->getAttribute(Mage_Sales_Model_Order::ENTITY, 'correlation_id', 'attribute_id')) {
$setup->addAttribute(
Mage_Sales_Model_Order::ENTITY,
'correlation_id',

mysql with dbeaver useful queries (from magento)

select

  • SELECT * from sales_order

  • Select where column it is not empty SELECT * FROM sales_order WHERE openpix_correlationid <> ''

  • Show all columns DESCRIBE sales_order

<?php
namespace MagentoPayment\Payment\Model\Payment;
class Payment extends \Magento\Payment\Model\Method\AbstractMethod {
/**
* @var string
*/
const CODE = 'magento_payment';
jun 08 11:45:06 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 42929, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:45:10 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 44644, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:45:15 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 45752, resource id: 119537670, major code: 18 (ChangeProperty), minor code: 0
jun 08 11:47:12 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 55608, resource id: 14785991, major code: 3 (GetWindowAttributes), minor code: 0
jun 08 11:47:12 daniloabarch kwin_x11[1603]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 55609, resource id: 14785991, major code: 14 (GetGeometry), minor code: 0
jun 08 11:49:45 daniloabarch plasmashell[1649]: org.kde.plasma.notifications

run a http post request with PHP

  • create a new file with code below:
<?php
function httpPost($url, $data)
{
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
 curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));

rvm

version

  • change version rvm use 2.5.8