Skip to content

Instantly share code, notes, and snippets.

<?php
// CASH PAYMENT GATEWAY
/**
* Add the gateway to WC Available Gateways
*
* @since 1.0.0
* @param array $gateways all available WC gateways
* @return array $gateways all WC gateways + offline gateway
<?php
define('_JEXEC', 1);
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
// Boot the DI container
$container = \Joomla\CMS\Factory::getContainer();
/*
@farik92
farik92 / msptinkoffCredit.class.php
Created April 17, 2024 16:14 — forked from Sentinel-7/msptinkoffCredit.class.php
Тиньков рассрочка или кредит
<?php
// строка 32,38,39,40 создаем поля в системных и прописываем там идентификаторы
// ini_set('display_errors', 1);
// ini_set('error_reporting', -1);
require_once MODX_CORE_PATH . 'components/minishop2/model/minishop2/mspaymenthandler.class.php';
class TinkoffCredit extends msPaymentHandler implements msPaymentInterface{
public $demo;
@farik92
farik92 / send.php
Created April 8, 2024 09:50 — forked from webag/send.php
PHP Добавление контакта и сделки в amocrm с полями из формы сайта.
<?
//amo
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку
$contact_name = $cname; //Название добавляемого контакта
$contact_phone = $cphone; //Телефон контакта
@farik92
farik92 / index.html
Created January 12, 2024 18:45 — forked from DaljeetDhaliwal/index.html
under construction
<html>
<head>
<meta charset="UTF-8">
<title>stark coffee table keyboard</title>
<link rel="stylesheet" href="css/reset.css">
@farik92
farik92 / woocommerce-create-order.md
Created November 5, 2023 01:40 — forked from stormwild/woocommerce-create-order.md
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@farik92
farik92 / ajaxsfilter.js
Created September 22, 2023 21:44 — forked from santanup789/ajaxsfilter.js
Woocommerce product multiple term checkbox filtering by simple ajax [category + color + price]
jQuery(function($){
$('#filter').change(function(){
var filter = $('#filter');
$.ajax({
url:filter.attr('action'),
data:filter.serialize(), // form data
type:filter.attr('method'), // POST
beforeSend:function(xhr){
//filter.find('button').text('Processing...'); // changing the button label
$('#appendTable').html('<label class="alert">Processing...</label>');
@farik92
farik92 / functions.php
Last active September 8, 2023 19:56 — forked from pauloiankoski/functions.php
Call action on submit wpcf7 form
<?php
add_action( 'wpcf7_submit', function( $contact_form, $result ) {
if ( empty( $result['status'] ) || 'mail_sent' != $result['status'] ) {
return;
}
$submission = WPCF7_Submission::get_instance();
if ( ! $submission || ! $posted_data = $submission->get_posted_data() ) {
return;
}
@farik92
farik92 / content-single-product.php
Created June 27, 2023 00:43 — forked from etiennetremel/content-single-product.php
WooCommerce Upsells Upsells as checkbox. When product is deleted from the cart, upsells are also deleted.
<?php
/**
* The template for displaying product content in the single-product.php template
*
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
@farik92
farik92 / woocommerce-overrides.php
Created June 22, 2023 06:41 — forked from BurlesonBrad/woocommerce-overrides.php
Include this in your theme to allow WooCommerce variable products to be displayed in a grid format with each variation having there own quantity and add to cart button, rather then the drop-down options. This should be include in your themes function file.
<?php
/******************************************************************************
* Variation Grid
*
* The following function allow for the theme to display product variations in a grid format.
* This code could be moved to a plugin but is in the theme function file as it used the
* themes grid system.
*
* @reference: http://www.eggplantstudios.ca/woocommerce-product-variation-add-cart-grid/
* ******************************************************************************/