Skip to content

Instantly share code, notes, and snippets.

View Bwilliamson55's full-sized avatar

Ben Williamson Bwilliamson55

View GitHub Profile
@Bwilliamson55
Bwilliamson55 / Magento-243-entity-constants.md
Last active September 5, 2021 14:19
Magento 2.4.3 ENTITY constants
Entity type id Where it's declared
store \Magento\Store\Model\Store::ENTITY
store_website \Magento\Store\Model\Website::ENTITY
store_group \Magento\Store\Model\Group::ENTITY
order \Magento\Sales\Model\Order::ENTITY
customer \Magento\Customer\Model\Customer::ENTITY
customer_address \Magento\Customer\Model\Indexer\Address\AttributeProvider::ENTITY
customer_group \Magento\Customer\Model\Group::ENTITY
catalog_eav_attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute::ENTITY
@Bwilliamson55
Bwilliamson55 / export_model_example.puml
Last active July 26, 2022 16:50
PlantUML class and activity diagram for Custom Magento 2 Export Model
@startuml
'***********
'play around with this via https://www.planttext.com/
'***********
!theme reddress-darkgreen
skinparam pageMargin 0
package CustomModule {
@Bwilliamson55
Bwilliamson55 / sku_and_attribute_builder.sql
Created July 26, 2022 21:26
Magento 2 CE sku_and_attribute query builder
SELECT
GROUP_CONCAT(
CONCAT(
' MAX(IF(attribute_code = ''',
t.attribute_code,
''', value, NULL)) AS ',
t.attribute_code
)
) INTO @PivotQuery
FROM