Skip to content

Instantly share code, notes, and snippets.

Avatar
🦊
Check my gitlab.com/rakshazi

Nikita Chernyi rakshazi

🦊
Check my gitlab.com/rakshazi
View GitHub Profile
@rakshazi
rakshazi / example.md
Created Jul 2, 2019
Check your repos with stars on GitHub
View example.md
$ stars.sh
8       titanium-codes/LocGetter
5       titanium-codes/docker-compose
5       frameworkwtf/skeleton
3       titanium-codes/yandex-tts-processor
2       titanium-codes/cibu
2       titanium-codes/bump.sh
2       rakshazi/getSetTrait
@rakshazi
rakshazi / magento2-sampledata.sh
Created Aug 26, 2016
Install Magento 2 sample data.
View magento2-sampledata.sh
bin/magento sampledata:install
bin/magento sampledata:deploy
bin/magento module:enable Magento_CustomerSampleData Magento_MsrpSampleData Magento_CatalogSampleData Magento_DownloadableSampleData Magento_OfflineShippingSampleData Magento_BundleSampleData Magento_ConfigurableSampleData Magento_ThemeSampleData Magento_ProductLinksSampleData Magento_ReviewSampleData Magento_CatalogRuleSampleData Magento_SwatchesSampleData Magento_GroupedProductSampleData Magento_TaxSampleData Magento_CmsSampleData Magento_SalesRuleSampleData Magento_SalesSampleData Magento_WidgetSampleData Magento_WishlistSampleData
rm -rf var/cache/* var/page_cache/* var/generation/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento indexer:reindex
bin/magento setup:static-content:deploy
View magento-301-redirect-for-products.php
<?php
public function viewAction()
{
// Get initial data from request
$categoryId = (int) $this->getRequest()->getParam('category', false);
$productId = (int) $this->getRequest()->getParam('id');
$specifyOptions = $this->getRequest()->getParam('options');
/////////////////////////////////////// START WITH 301 REDIRECT
$product = Mage::getModel('catalog/product')->load($productId);
View matrixrate-fix.php
<?php
foreach ($request->getAllItems() as $item) {
$request->setPackageValue($request->getPackageValue() + $item->getTaxAmount());
}
You can’t perform that action at this time.