Skip to content

Ansyori Blog Posts

[Linux]Change PHP Cli Version

just an example, upgrade php cli version to php 7.1, make sure you have sudo right

or

 

Continue reading [Linux]Change PHP Cli Version

Comments closed

[Linux] How to list IP who successful & failed login into server by ssh

for failed login attempt, use this

and then for the success

the result for both action will be like this <number of times>…

Continue reading [Linux] How to list IP who successful & failed login into server by ssh

Comments closed

[Magento 2] Add Multiple Products Programatically

 

Continue reading [Magento 2] Add Multiple Products Programatically

Comments closed

Magento2 : Custom Sql Directive

 

Continue reading Magento2 : Custom Sql Directive

Comments closed

Magento2 : Sql query to get product attribute value

 

Continue reading Magento2 : Sql query to get product attribute value

Comments closed

[Magento 2] Run PHP code externally

here example to load sales order data externally in magento 2, for example you’re going to use this url http://yourmagento2url/test.php

 

Continue reading [Magento 2] Run PHP code externally

Comments closed

[Magento 2] Dirty Way to Create Own Log File

Yes, it’s dirty…not a Magento 2 standard… so it just for who love ‘shortcut’ way to create own log file, let’s get started

 

Continue reading [Magento 2] Dirty Way to Create Own Log File

Comments closed

[Magento] Update category attributes programmatically

here you go

 

Continue reading [Magento] Update category attributes programmatically

Comments closed

Magento : SQL Directive to Get Products with attributes

here the sql…

 

Continue reading Magento : SQL Directive to Get Products with attributes

Comments closed

Magento 2 : Create Admin User From Shell

use SSH to perform this action, from your Magento root, use this command  

 

Continue reading Magento 2 : Create Admin User From Shell

Comments closed

Magento 2 : Update EAV Attribute

for example, we want to change ‘label’ and ‘sort order’ attribute ‘postcode’ from ‘customer_address’ attribute type, here upgrade data script

 

Continue reading Magento 2 : Update EAV Attribute

Comments closed

Magento 2 : Add Customer Address Attribute

in your ‘Company/Modulename/setup/InstallData.php’ here example code

 

Continue reading Magento 2 : Add Customer Address Attribute

Comments closed

Magento : Add external JS & CSS from layout

here example layout script how to add external JS & CSS link use Magento way 😉

 

Continue reading Magento : Add external JS & CSS from layout

Comments closed

Magento : Filter product collection by multiple categories

this is an interesting post i found on StackExchange, how to filter product collection by multiple categories, here the code  

source : http://magento.stackexchange.com/questions/7094/filter-product-collection-by-multiple-categories

Continue reading Magento : Filter product collection by multiple categories

Comments closed

Magento : Add New Attribute & Attribute Set Programatically

Here short script to add new attributes & attributes set  

 

Continue reading Magento : Add New Attribute & Attribute Set Programatically

Comments closed

CSS: Disable CSS Animations

below css code, to disable any related to css animation

credit : https://dev.webonomic.nl/how-to-disable-css-transforms-transistions-and-animations

Continue reading CSS: Disable CSS Animations

Comments closed

CSS: Styling Scroll Bar

let say you want to styling overflow div bar, here example css

 

Continue reading CSS: Styling Scroll Bar

Comments closed

Simple PHP Script to List & Kill Current Mysql Process

here we go

Continue reading Simple PHP Script to List & Kill Current Mysql Process

Comments closed

Magento : Get product collection has tier price only

here my script get product collection who has tier price only!!!!!!!!!!!!!!!!!! of course also in stock :p

 

Continue reading Magento : Get product collection has tier price only

Comments closed

Create Magento 2 Module (Basic) Part I

here my first step to understanding magento 2 module development by create hello world extension, haha: create file app/code/Ansyori/HelloWorld/etc/module.xml here module.xml file content

then create…

Continue reading Create Magento 2 Module (Basic) Part I

Comments closed

Magento : Create Fake POST

 

Continue reading Magento : Create Fake POST

Comments closed

WordPress : SQL get Id, post title,categories, & Tags

this is killer sql codes to get those values  

 

Continue reading WordPress : SQL get Id, post title,categories, & Tags

Comments closed

Magento : Render any XML doc on controller

here example script how to display custom xml on your custom magento plugin  

 

Continue reading Magento : Render any XML doc on controller

Leave a Comment

Magento : Infinite Scroll for WordPress Posts Integration on Magento

i wrote some jquery script to perform infinite scroll WordPress posts on magento site, here you go

 

Continue reading Magento : Infinite Scroll for WordPress Posts Integration on Magento

Leave a Comment

Magento : Execute Custom Module Cron Manually

let say we have cron setup on config.xml, like this

and then a functions ready to execute

we can execute manually by run…

Continue reading Magento : Execute Custom Module Cron Manually

Leave a Comment

Magento : Custom Email Template on Custom Module

here the XML guide

 

 

Continue reading Magento : Custom Email Template on Custom Module

Leave a Comment

Magento : Get All Customer Wishlist Items

here you go

  the results will be like this  

   

Continue reading Magento : Get All Customer Wishlist Items

Leave a Comment