Prototype.js Removal
Posted 6 months ago. Visible to the public. Linked content.
This is monumental.
https://github.com/OpenMage/magento-lts/discussions/3645#discussioncomment-7547229
Last edit
6 months ago
kiatng
Related cards:
How to use cache in OpenMage / Magento 1.x to speed things up
Mechanism: cache in model
First, save the cache
// app\code\core\Mage\Core\Model\App.php Mage_Core_Model_App
/**
* Saving cache data
*
* @param mixed $data
* @param string $id
* @param array $tags
* @param null|false|int ...
validation.js
/*
* Really easy field validation with Prototype
* http://tetlaw.id.au/view/javascript/really-easy-field-validation
* Andrew Tetlaw
* Version 1.5.4.1 (2007-01-05)
*
* Copyright (c) 2007 Andrew Tetlaw
* Permission is hereby granted, free of c...
When there is no payment methods on onepage checkout page
There are many reasons why a payment method is not listed or missing on the checkout page:
- admin > System > Configuration > Sales > Payment Methods >
- check that the payment methods are enabled
- check for min and max amount of the...
Add new input type in product custom options
custom module productcoption
config.xml
<config>
<modules>
<Somemod_ProductCoption>
<version>0.0.1</version>
</Somemod_ProductCoption>
</modules>
<global>
<resources>
<productcopti...
Check if the current page is homepage
<?php if(!Mage::getBlockSingleton('page/html_header')->getIsHomePage()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php endif ?>
nginx config
See production grade nginx and docker config here.
Some notes on this:
- the PCI work was trial and error, we did set up, the external audit did penetration/probe testing, we adjusted settings...
Adminhtml JSON Response Body
HTML
public function visibleProductsAction()
{
$this->getResponse()->setBody(
$this->getLayout()->createBlock('module/adminhtml_block_type')->toHtml()
);
}
Generic Block:
$block = $this->getLayout()->createBloc...
Add Custom API
Define the API in the custom module app\code\local\{vendor}\{module}\etc\api.xml
:
<config>
<api>
<resources>
<member translate="title" module="benefit">
<model>benefit/api_member</model>
...
Filter EAV collection
condA AND (cond1 OR cond2 OR cond3)
$cincId = $session->getCustomerId();
$attributes = array(
array('attribute'=>'mc_by', 'eq'=>$clinicId),
array('attribute'=>'mc_lb_by', 'eq'=>$clinicId),
array('attribute'=>'mc...
Link Top Menu Item to Product View
Top menu is configured in backend > Catalog > Manage Categories. The landing page can be set to product list, static block, or a combination of both. But what if we want to by pass the product listing and land on a product page? Here's the techniq...
Posted by kiatng to OpenMage (2023-11-10 01:12)