This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const CC_BRAND_ELO = 'elo'; | |
export const CC_BRAND_VISA = 'visa'; | |
export const CC_BRAND_MASTER = 'master'; | |
export const CC_BRAND_AMEX = 'amex'; | |
export const CC_BRAND_DISCOVER = 'discover'; | |
export const CC_BRAND_DINERS = 'diners'; | |
export const CC_BRAND_HIPER = 'hiper'; | |
const REPEATED_NUMBERS = 'not-valid'; | |
export const getCardBrand = number => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<head> | |
<link src="js/sticky-header.js" type="application/javascript" /> | |
</head> | |
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="checkout.cart.giftcardaccount" remove="true" /> | |
<referenceBlock name="checkout.cart.order.actions.gift_options" remove="true" /> | |
<referenceBlock name="checkout.cart.item.renderers.simple.actions.gift_options" remove="true" /> | |
<referenceBlock name="checkout.cart.item.renderers.default.actions.gift_options" remove="true" /> | |
<referenceBlock name="checkout.cart.item.renderers.bundle.actions.gift_options" remove="true" /> | |
<referenceBlock name="checkout.cart.item.renderers.configurable.actions.gift_options" remove="true" /> | |
<referenceBlock name="checkout.cart.item.renderers.giftcard.actions.gift_options" remove="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trigger = (element, eventName) => { | |
let event; | |
if (document.createEvent) { | |
event = document.createEvent("HTMLEvents"); | |
event.initEvent(eventName, true, true); | |
} else { | |
event = document.createEventObject(); | |
event.eventType = eventName; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this code on your browser console | |
localStorage.removeItem("mage-translation-file-version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// vendor/magento/module-checkout/Controller/Onepage/Success.php | |
// or app/code/Magento/Checkout/Controller/Onepage/Success.php | |
// Comment the follow line | |
$session->clearQuote(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Edit the follow file: vendor/magento/framework/App/Action/Action.php | |
public function __construct(Context $context) | |
{ | |
// ... // | |
$this->messageManager->addError(__('Error message.')); | |
$this->messageManager->addSuccessMessage(__('Success message.')); | |
$this->messageManager->addWarning(__('Warning message.')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Editor configuration, see https://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rules = [ | |
'8 characteres', | |
'lowercase word', | |
'uppercase word', | |
]; | |
// Lista de erros | |
const Errors = ({ active }) => { | |
return active && ( | |
<ul> |
OlderNewer