I will publish 10 guest post with high DA/PA Site for $5

I will publish 10 guest post with high DA/PA Site

Are you searching for high position visitor post Gigs, at that point this Gig is for you? I will Write and Publish Guest Post on High-Quality DA/PA Site.

It’s very helpful and workable for your URL and rank search first keyword. All links will be manually created, permanent, Natural, and very strong.

So your site just begins to rank.

You will Get My Service:

1.100% Manual Work

2.Unique article

3.0% plagiarism in content

4.High authority DA/PA Site(DA/PAA 50-90+)

5.Dofollow link

6. Google news approved sites

7. Permanent backlinks

8. High Quality SEO guest post

9. Quality Work Guaranteed

So if you’ve any question, you can contact me any time.

Thank you!

.(tagsToTranslate)guest(t)post(t)seo(t)service(t)guest(t)posting(t)authority(t)backli(t)link(t)building(t)dofollow(t)backlin

magento2 – how to show customer authentication popup when clicking on checkout button in minicart while guest checkout is enable mangento 2

I want to check if a user is logged in before proceeding to checkout. On the basis of customer login condition, i want to show the login popup if not login, and redirect to checkout if logged in already.

IMPORTANT: I have guest checkout enabled in the configuration. Because I want user to checkout with guest account

I am able to redirect user to login page when not logged in. But not able to use popup instead of redirecting it to login page.

to redirect user to login page, I did the following changes in my minicart.js file:

var cc = customerData.get('customer');
if(cc().firstname){
    console.log("customerData",true);
    var urls = window.checkout.checkoutUrl; 
}else{
    console.log("customerData",false);
    $( document.body ).removeClass( "logedin" );
    var urls = window.checkout.customerLoginUrl;
}

please help me find out how to use popup login instead redirecting to login page.

magento2 – Uncaught Type Error in Magento 2 for Guest User

I have Create a Module to save some custom field it works fine for Logged in user but it doesn’t work for Guest User.

My RegCheckoutModelSimpleNoteGuestManagement file :

<?php
namespace RegCheckoutModel;

use MagentoQuoteModelQuoteIdMaskFactory;
use RegCheckoutApiDataSimpleNoteInterface;
use RegCheckoutApiSimpleNoteGuestManagementInterface;
use RegCheckoutApiSimpleNoteManagementInterface;
use RegCheckoutSetupSchemaInformation;
use Exception;
use MagentoFrameworkExceptionCouldNotSaveException;
use MagentoFrameworkExceptionNoSuchEntityException;
use MagentoQuoteApiCartRepositoryInterface;

/**
 * Class SimpleNoteManagement
 */
class SimpleNoteGuestManagement implements SimpleNoteGuestManagementInterface
{
/**
 * Quote repository.
 *
 * @var CartRepositoryInterface
 */
protected $quoteRepository;
protected $customFieldsRepository;

/**
 * SimpleNoteManagement constructor.
 *
 * @param CartRepositoryInterface $quoteRepository
 */
public function __construct(
    QuoteIdMaskFactory $quoteRepository,
    SimpleNoteManagementInterface $customFieldsRepository
)
{
    $this->quoteRepository = $quoteRepository;
    $this->customFieldsRepository = $customFieldsRepository;
}

/**
 * Save simple note number in the quote
 *
 * @param int $cartId
 * @param SimpleNoteInterface $simpleNote
 *
 * @return null|string
 *
 * @throws CouldNotSaveException
 * @throws NoSuchEntityException
 */

public function saveSimpleNote(
    string $cartId,
    SimpleNoteInterface $simpleNote
): SimpleNoteInterface {
    $quoteIdMask = $this->quoteRepository->create()->load($cartId, 'masked_id');
    return $this->customFieldsRepository->saveSimpleNote((int)$quoteIdMask->getQuoteId(), $simpleNote);
}
}

My RegCheckoutApiDataSimpleNoteInterface file

<?php

namespace RegCheckoutApiData;
/**
 * Interface SimpleNoteInterface
*  /
interface SimpleNoteInterface
{
/**
 * Get Simple Note
 *
 * @return string
 */
public function getSimpleNote();
/**
 * Set Simple Note
 *
 * @param string $simpleNote
 *
 * @return void
 */
public function setSimpleNote(string $simpleNote);
}

my Reg/Checkout/Api/SimpleNoteGuestManagementInterface.php file

<?php

namespace RegCheckoutApi;
/**
 * Interface for saving the checkout note to the quote for orders
 *
  * @api
 */
interface SimpleNoteGuestManagementInterface
{
/**
 * @param int $cartId
 * @param AtwixSimpleNoteApiDataSimpleNoteInterface $simpleNote
 *
 * @return string
 */
public function saveSimpleNote(
    string $cartId,
    RegCheckoutApiDataSimpleNoteInterface $simpleNote
);
} 

My SimpleNoteInterface code :

<?php

namespace RegCheckoutApiData;
 /**
 * Interface SimpleNoteInterface
 */
interface SimpleNoteInterface
{
/**
 * Get Simple Note
 *
 * @return string
 */
public function getSimpleNote();
/**
 * Set Simple Note
 *
 * @param string $simpleNote
 *
 * @return void
 */
public function setSimpleNote(string $simpleNote);
}

my file Reg/Checkout/Model/Data/SimpleNote.php

<?php
namespace RegCheckoutModelData;
use RegCheckoutApiDataSimpleNoteInterface;
use RegCheckoutSetupSchemaInformation;
use MagentoFrameworkApiAbstractSimpleObject;
/**
 * Class SimpleNote
 */
class SimpleNote extends AbstractSimpleObject implements 
SimpleNoteInterface
{
/**
 * @inheritdoc
 */
public function getSimpleNote()
{
    return $this->_get(SchemaInformation::ATTRIBUTE_SIMPLE_NOTE);
}
public function setSimpleNote(string $simpleNote)
{
    return $this->setData(SchemaInformation::ATTRIBUTE_SIMPLE_NOTE, $simpleNote);
}
}

my di.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="RegCheckoutApiDataSimpleNoteInterface" type="RegCheckoutModelDataSimpleNote" />
<preference for="RegCheckoutApiDataSimpleVehicleInterface" type="RegCheckoutModelDataSimpleAge" />
<preference for="RegCheckoutApiDataSimpleRegisteredInterface" type="RegCheckoutModelDataSimpleKeeper" />
<preference for="RegCheckoutApiSimpleNoteManagementInterface" type="RegCheckoutModelSimpleNoteManagement" />
<preference for="RegCheckoutApiVehicleAgeManagementInterface" type="RegCheckoutModelVehicleAgeManagement" />
<preference for="RegCheckoutApiRegisterKeeperManagementInterface" type="RegCheckoutModelRegisteredKeeperManagement" />
<preference for="RegCheckoutApiSimpleNoteGuestManagementInterface" type="RegCheckoutModelSimpleNoteGuestManagement" />
<virtualType name="MagentoSalesModelResourceModelOrderGrid" type="MagentoSalesModelResourceModelGrid">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="simple_note" xsi:type="string">sales_order.simple_note</item>
            <item name="vehicle_age" xsi:type="string">sales_order.vehicle_age</item>
            <item name="registered_keeper" xsi:type="string">sales_order.registered_keeper</item>
        </argument>
    </arguments>
</virtualType>

My error are :

Uncaught TypeError: Return value of RegCheckoutModelSimpleNoteManagement::saveSimpleNote() must implement interface RegCheckoutApiDataSimpleNoteInterface, string returned in /var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteManagement.php:62
Stack trace:
#0 /var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteGuestManagement.php(58): RegCheckoutModelSimpleNoteManagement-&gt;saveSimpleNote(63, Object(RegCheckoutModelDataSimpleNote))
#1 (internal function): RegCheckoutModelSimpleNoteGuestManagement-&gt;saveSimpleNote('ASLUPiZ8zeNWBbg...', Object(RegCheckoutModelDataSimpleNote))
#2 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)
#3 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest.php(188): MagentoWebapiControllerRestSynchronousRequestProcessor-&gt;process(Object(MagentoFrameworkWebapiRestRequestProxy))
#4 /var/www/html/reg-dealers/vendor/magento/framew in <b>/var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteManagement.php</b> on line <b>62</b><br />
{"messages":{"error":({"code":500,"message":"Fatal Error: 'Uncaught TypeError: Return value of Reg\Checkout\Model\SimpleNoteManagement::saveSimpleNote() must implement interface Reg\Checkout\Api\Data\SimpleNoteInterface, string returned in /var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteManagement.php:62nStack trace:n#0 /var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteGuestManagement.php(58): Reg\Checkout\Model\SimpleNoteManagement->saveSimpleNote(63, Object(Reg\Checkout\Model\Data\SimpleNote))n#1 (internal function): Reg\Checkout\Model\SimpleNoteGuestManagement->saveSimpleNote('ASLUPiZ8zeNWBbg...', Object(Reg\Checkout\Model\Data\SimpleNote))n#2 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)n#3 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))n#4 /var/www/html/reg-dealers/vendor/magento/framew' in '/var/www/html/reg-dealers/app/code/Reg/Checkout/Model/SimpleNoteManagement.php' on line 62","trace":"Trace is not available."})}}

magento2 – Uncaught Type Error in checkout Module for Guest User in Magento 2

I have created a custom module for Checkout in works fine for Logged in User but gave an error for Guest Users.

Uncaught TypeError: Return value of RegCheckoutModelSimpleNoteGuestManagement::saveSimpleNote() must implement interface RegCheckoutApiDataSimpleNoteInterface

My RegCheckoutModelSimpleNoteGuestManagement file :

<?php
namespace RegCheckoutModel;

use MagentoQuoteModelQuoteIdMaskFactory;
use RegCheckoutApiDataSimpleNoteInterface;
use RegCheckoutApiSimpleNoteGuestManagementInterface;
use RegCheckoutApiSimpleNoteManagementInterface;
use RegCheckoutSetupSchemaInformation;
use Exception;
use MagentoFrameworkExceptionCouldNotSaveException;
use MagentoFrameworkExceptionNoSuchEntityException;
use MagentoQuoteApiCartRepositoryInterface;

/**
 * Class SimpleNoteManagement
 */
class SimpleNoteGuestManagement implements SimpleNoteGuestManagementInterface
{
/**
 * Quote repository.
 *
 * @var CartRepositoryInterface
 */
protected $quoteRepository;
protected $customFieldsRepository;

/**
 * SimpleNoteManagement constructor.
 *
 * @param CartRepositoryInterface $quoteRepository
 */
public function __construct(
    QuoteIdMaskFactory $quoteRepository,
    SimpleNoteManagementInterface $customFieldsRepository
)
{
    $this->quoteRepository = $quoteRepository;
    $this->customFieldsRepository = $customFieldsRepository;
}

/**
 * Save simple note number in the quote
 *
 * @param int $cartId
 * @param SimpleNoteInterface $simpleNote
 *
 * @return null|string
 *
 * @throws CouldNotSaveException
 * @throws NoSuchEntityException
 */

public function saveSimpleNote(
    string $cartId,
    SimpleNoteInterface $simpleNote
): SimpleNoteInterface {
    $quoteIdMask = $this->quoteRepository->create()->load($cartId, 'masked_id');
    return $this->customFieldsRepository->saveSimpleNote((int)$quoteIdMask->getQuoteId(), $simpleNote);
}
}

My RegCheckoutApiDataSimpleNoteInterface file

<?php

namespace RegCheckoutApiData;
/**
 * Interface SimpleNoteInterface
*  /
interface SimpleNoteInterface
{
/**
 * Get Simple Note
 *
 * @return string
 */
public function getSimpleNote();
/**
 * Set Simple Note
 *
 * @param string $simpleNote
 *
 * @return void
 */
public function setSimpleNote(string $simpleNote);
}

my Reg/Checkout/Api/SimpleNoteGuestManagementInterface.php file

<?php

namespace RegCheckoutApi;
/**
 * Interface for saving the checkout note to the quote for orders
 *
  * @api
 */
interface SimpleNoteGuestManagementInterface
{
/**
 * @param int $cartId
 * @param AtwixSimpleNoteApiDataSimpleNoteInterface $simpleNote
 *
 * @return string
 */
public function saveSimpleNote(
    string $cartId,
    RegCheckoutApiDataSimpleNoteInterface $simpleNote
);
} 

Any help is appreciated.

magento2 – On saving data for guest user error occurred in Magento 2

I have created a module to save some custom data from checkout form using AJAX.

The module works perfectly for logged in user but for guest user it gives me this error.

{"message":"The "9kUx9DorBmt4d9e55rIFBfjGNibrWojw" value's type is invalid. The "int" type was expected. Verify and try again.","trace":null}

Any help is appriciated.