1

I want to add a description on product Grid/List view page as the picture shows (The "Order Online" and "Delivery Available" part). Is there any way I can achieve this? Or any extension can help me with this? I am using Magento2.3. enter image description here

  • Are you using a custom theme ? – Pawan Mar 7 at 1:34
  • I am now using the default Magento luma theme. – Rebecca Mar 7 at 1:58
  • do you have access to code (files) ? – Pawan Mar 7 at 2:02
  • Yes, I do. But I haven't done any work with the code itself. Do I need to modify the code? – Rebecca Mar 7 at 3:14
  • Yes, You need to edit files! It may also require some CSS adjustment – Pawan Mar 7 at 3:16
1

If this is static / same text for all products then you can just add this text in your theme's category listing page

OR

Best way is you create 2 product attributes ( text field ideally ) and on set option "Display on Listing Page " ( While creating attribute ).

And change your

app/design/frontend/Company/theme/Magento_Catalog/templates/product/list.phtml

file call these attributes like. Supposed your attributes codes are order_online and delivery_available then your template code would be :

echo $product->getOrderOnline();
echo $product->getDelieryAvailable();

Add above lines where you want to show on listing page ( may be under actions-primary div ). it will get you text / attribute which you want, Also you can set condition if !empty so it will only show this text where it is provided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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