Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multistore product sync wrong name #1055

Closed
JoostWan opened this issue Sep 3, 2020 · 2 comments
Closed

Multistore product sync wrong name #1055

JoostWan opened this issue Sep 3, 2020 · 2 comments

Comments

@JoostWan
Copy link

JoostWan commented Sep 3, 2020

Preconditions

1. Magento CE 2.3.5-p2
2. mc-magento2  102.3.39

Problem

The product sync to Mailchimp for Ecommerce data synces the wrong name. It should be sync to name of the product for that specific store ID but it uses the name from default store (ID 1). The url and the image are correct but only name not.

protected function _buildProductData(
        \Magento\Catalog\Model\Product $product,
        $magentoStoreId,
        $isVarient = true,
        $variants = null
    ) {

        error_log("Store ID: " . $magentoStoreId);
        error_log("Product Name: " . $product->getName());

        $data = [];
        $parent = null;

        //data applied for both root and varient products
        $data["id"] = $product->getId();
        $data["title"] = $product->getName();
        $data["url"] = $product->getProductUrl();

....
[03-Sep-2020 08:20:50 UTC] Store ID: 5
[03-Sep-2020 08:20:50 UTC] Product Name: Product name default store
[03-Sep-2020 08:20:50 UTC] Array
(
    [id] => 139
    [title] => Product name default store
    [url] => xxxxxx
    [image_url] => xxxx
    [published_at_foreign] =>
    [sku] => productsku
    [price] => 5
    [inventory_quantity] => 746
    [backorders] => 0
    [visibility] => true
)

@gonzaloebiz gonzaloebiz self-assigned this Sep 11, 2020
@gonzaloebiz gonzaloebiz added this to the 10x.x.42 milestone Sep 11, 2020
gonzaloebiz added a commit that referenced this issue Sep 11, 2020
gonzaloebiz added a commit that referenced this issue Sep 11, 2020
gonzaloebiz added a commit that referenced this issue Sep 11, 2020
gonzaloebiz added a commit that referenced this issue Sep 11, 2020
gonzaloebiz added a commit that referenced this issue Sep 11, 2020
@gonzaloebiz
Copy link
Collaborator

Thanks @JoostWan for your contribution

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants