0

I show a few attributes in my categories(list view) on my default store view and that is working well. Magento ver. 2.4.3

Now I created a second store view but unfortunately the attributes didn´t show up. All other attributes for example on the product detail page are displayed correctly. I use the following code in list.phtml:

        <?php if ($_product->getData('sku') !== null):?>
                        <div style="position: relative;" class="product attribute style">
                        <div style="float: left;" class="type cat"><?php echo __('SKU: ')?></div>
                        <div style="float: left;" class="value cat" itemprop="style"><?php echo $_product->getData('sku') ?></div>
                        </div><br>
        <?php endif; ?>

As the attributes are displayed correctly in my default store view the settings should be correct. So it should be something store view related. The list.phtml is working as some other stuff(HTML) is displayed on that store view.

I tried to set the attributes to global, website, store view and of course they are set to Used in Product Listing. I ran reindex, clear cache and deploy several times.

I don't use the second store view to use another language the purpose is only tax related. So usually I want to mirror the store view only the tax setting is different.

Thank you for any help or advice.

1
  • Have you created any custom theme for store wise? Commented Dec 31, 2022 at 18:01

2 Answers 2

0
  1. Check whether in Store-View scope in admin panel this attribute exist for Product
  2. Check whether you use a flat attributes for this store-view? You can check it in Store => Configuration => Catalog. There should be "use flat category" option.
  3. When you use "flat" data, then check whether indexer is configured to schedule or save
  4. When schedule then check whether cron is configured correctly. You can also check in database table whether attributes exists for this product.
  5. Check attribute option and used_in_listing property. Set it to true and reindex then.

When it doesn't help, then you probably have some custom code changes by a module / your code.

Btw, Magento has a very good option to configure taxes. You can use different "product tax group" or "customer tax group" and using it I believe that you should be able to configure it in one store :)

0

Thank you for your answers. It looks like this was only related to the position of the code in the list.phtml. As soon as I put the code into some other position in the list.phtml the attribute shows up in all store views. Thank you again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.