Skip to content

Instantly share code, notes, and snippets.

View netzkollektiv's full-sized avatar

netzkollektiv

View GitHub Profile
@netzkollektiv
netzkollektiv / gist:414d6b3c56526f75d4b9dd82fc5259e6
Created December 5, 2023 07:32
magento-2-add-category-seo-description-attribute-using-sql.sql
INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`, `attribute_model`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, `is_user_defined`, `default_value`, `is_unique`, `note`)
VALUES
(3, 'description', NULL, NULL, 'text', NULL, NULL, 'textarea', 'Footer Description', NULL, NULL, 0, 0, NULL, 0, NULL);
INSERT INTO `catalog_eav_attribute` (`attribute_id`, `frontend_input_renderer`, `is_global`, `is_visible`, `is_searchable`, `is_filterable`, `is_comparable`, `is_visible_on_front`, `is_html_allowed_on_front`, `is_used_for_price_rules`, `is_filterable_in_search`, `used_in_product_listing`, `used_for_sort_by`, `apply_to`, `is_visible_in_advanced_search`, `position`, `is_wysiwyg_enabled`, `is_used_for_promo_rules`, `is_required_in_admin_store`, `is_used_in_grid`, `is_visible_in_grid`, `is_filterable_in_grid`, `search_weight`, `additional_data`, `is_visible_on_checkout`, `is_displayed_in_autocomplet
var bootstrapModal = {
bootstrapJs: 'https://ratenkauf.easycredit.de/widget/ratenrechner/v1/bootstrap.min-3.3.5.js',
modalTemplate: ['<div class="modal fade" tabindex="-1" role="dialog">',
'<div class="modal-dialog" role="document">',
'<div class="modal-content">',
'<div class="modal-header">',
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>',
'<h4 class="modal-title" style="color:#0066b3;">ratenkauf by easyCredit</h4>',
'</div>',
'<div class="modal-body ec-embed-responsive"></div>',
<?php
/*
* Plugin Name: Prevent Cancel Unpaid easyCredit Ratenkauf Orders
* Author: NETZKOLLEKTIV GmbH
* Description: Prevents unpaid orders paid with easyCredit-Ratenkauf from being cancelled
*/
// wc-easycredit-cancel-unpaid-orders.php
function wc_easycredit_cancel_unpaid_orders( $return, $order ) {
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="newtab">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string"></item>
<item name="collapsible" xsi:type="boolean">false</item>
<item name="label" xsi:type="string" translate="true">Module</item>
</item>
</argument>
<button name="__button">