Skip to content

Instantly share code, notes, and snippets.

View PechenkiUA's full-sized avatar
💭
On vacation

Pechenki PechenkiUA

💭
On vacation
View GitHub Profile
@PechenkiUA
PechenkiUA / gist:d34ccc8b3f759b40756d2c3a06f64318
Last active July 26, 2024 18:18
woocommerce-tm-extra-product-options
<?php
function get_epo_options_for_product_in_order($order_id, $product_id = null) {
$order = wc_get_order($order_id);
if (!$order) return false;
$epo_options = array();
foreach ($order->get_items() as $item_id => $item) {
$item_product_id = $item->get_product_id();
:local CurDate [/system clock get date]
:local CurTime [/system clock get time]
#Log
:log info "Download speed is more than 50M"
#SendTelegram
/tool fetch url="https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<Chat_ID>&text=YourMessage"
@PechenkiUA
PechenkiUA / moonraker.conf
Created May 20, 2024 16:42
notifier telegram
[notifier telegram]
url: tgram://token/chat_id
events: complete, error, cancelled
title: ⚠️3D принтер.
body: Статус принтера змінився на {event_name}. Файл: '{event_args[1].filename}'.
attach: http://127.0.0.1:8080/?action=snapshot
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>coder_customer_auth_token</name>
<code>coder_customer_auth_token</code>
<version>1.0</version>
<author>Coder</author>
<link>https://www.opencart.com</link>
<file path="system/library/cart/customer.php">
<operation>
@PechenkiUA
PechenkiUA / functions.php
Created March 20, 2024 09:48
Шорткод для виведення товарів з часом очікування 1 день та більше
<?php
/**
* Шорткод для виведення товарів з часом очікування 1 день та більше
*/
function shortcode_products_one_day_left($atts)
{
$atts = shortcode_atts(array(
'per_page' => 12,
), $atts, 'products_one_day_left');
@PechenkiUA
PechenkiUA / CodCache.php
Created March 18, 2024 11:47
opencart clear cache
<?php
/**
*
*/
class CodCache {
/**
* @var
*/
private $registry;
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Coder_ocm_error_top</name>
<code>default</code>
<version>1.0</version>
<author>CoderUa</author>
<link>https://google.com</link>
<file path="admin/view/template/common/header.twig">
<operation>
<search>
@PechenkiUA
PechenkiUA / GA.Event.ocmod.xml
Last active January 9, 2024 13:54
GA Event
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>GA Event</name>
<code>default</code>
<version>1.0</version>
<author>Coder</author>
<link></link>
@PechenkiUA
PechenkiUA / share_lang.ocmod.xml
Last active December 30, 2023 13:07
підключення спільної папки з перекладами шаблону opencart
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Share lang </name>
<version>0.1</version>
<author>CoderUA</author>
<link>https://example.com</link>
<code>name_code</code>
<description></description>
<!--