Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 3827ed6a authored by Nicolas's avatar Nicolas
Browse files

feat: Create Helper

parent e0c0e5ab
No related branches found
No related tags found
No related merge requests found
<?php
namespace NicolasBejean\Customer\Helper;
use Magento\Customer\Api\Data\AddressInterface;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Helper\Context;
/**
* Class SendGeoLocation
*
* @category PHP
* @package NicolasBejean\Customer\Helper
* @author Nicolas Béjean <nicolas@bejean.eu>
* @license https://lab.frogg.it/bejean-developpement/magento-2/modules/customer/-/blob/master/LICENCE GPL3 Licence
* @link https://www.bejean.eu
*/
class SendGeoLocation extends AbstractHelper
{
/**
* SendGeoLocation constructor.
* @param Context $context
*/
public function __construct(
Context $context
) {
parent::__construct($context);
}
public function sendDataToApi(CustomerInterface $customer, AddressInterface $address)
{
$createdAt = $customer->getCreatedAt();
$updatedAt = $customer->getUpdatedAt();
$websiteId = $customer->getWebsiteId();
$storeId = $customer->getStoreId();
$customerId = $customer->getId();
$groupId = $customer->getGroupId();
$country = $address->getCountryId();
$city = $address->getCity();
$postCode = $address->getPostcode();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment