Skip to content

Instantly share code, notes, and snippets.

View manojind's full-sized avatar

Manoj manojind

View GitHub Profile
@manojind
manojind / SOLVED Invoice Unique Constraint Violation Magento 2.2.5 when i am generating a invoice facing this error
Created September 26, 2018 08:20
SOLVED Invoice Unique Constraint Violation Magento 2.2.5 when i am generating a invoice facing this error
Just go to data base -> sales_invoice -> indexes just remove one rule "SALES_INVOICE_INCREMENT_ID_STORE_ID '
SOLVED Invoice Unique Constraint Violation Magento 2.2.5 when i am generating a invoice facing this error
@manojind
manojind / gist:49479d60a2592acb70da5db10dd4a476
Created September 13, 2018 08:04
We found a duplicate website, tier price, customer group and quantity Magento 2.2.5
We found a duplicate website, tier price, customer group and quantity magento 2
Just edit the product -> Tier price -> remove the duplicate tier price option ( Customer group , Website and qty ) ,
Like .
You set site1 -> QTY 10 -> Customer group retailer -> price $10
Now next price :-> You set site1 -> QTY 10 -> Customer group general -> price $10
Problem : Genral and retailer group will work same so remove anyone , If you need wholesaler customer then you can add next option .
@manojind
manojind / magento 2.2.5 create new admin user
Created September 8, 2018 09:38
magento 2.2.5 create new admin user biv CLI command
Bt CLI command : Run from magneto root
php bin/magento admin:user:create --admin-user='new-user' --admin-password='pass' --admin-email='admin@mail.com' --admin-firstname='Admin' --admin-lastname='Admin'
–admin-user-> Admin account username (required).
–admin-password-> Admin User account password (required).
–admin-email-> Admin user account’s email address (required).
–admin-firstname-> Admin user’s first name (required).
–admin-lastname-> Admin user’s last name (required).
@manojind
manojind / how to display the address fields in the registration form Magento 2.2.5 & 2.2.4
Created September 5, 2018 07:49
how to display the address fields in the registration form Magento 2.2.5 & 2.2.4
1. Go to /vendor/magento/module-customer/view/frontend/layout/customer_account_create.xml
and add a code : Line no : 20 Under <container name="customer.form.register.fields.before"
<action method="setShowAddressFields">
<argument name="show.address.fields" xsi:type="boolean">true</argument>
</action>
ROOT directory
1. public_html/vendor/magento/framework/Serialize/Serializer/Json.php
2. Just replace below fucntion (unserialize) and add new function OR just download attached file and replace with default
public function unserialize($string)