[34+ Indexes] Let's Explore Market - Premium and Optimized Magento Theme
Our Feature Items: SM Market // SM AutoStore // SP Revo
Shopping cart (0)
NOTE: OpenCart & WordPress Support

For OpenCart, Shopify products, please submit your questions here

For WordPress products, please submit your questions here


We may be experiencing slight delays in customer response times because of the outbreak of the coronavirus.

We are doing everything we can to ensure that you get a reply as quickly as possible. Please accept our sincere apologies and thank you for understanding.

We are here to serve :)

Our support team is currently online to solve your issues.

Our support team is currently offline

Our support heroes might not be around this hour. Please expect some delays.

Our support is available from

Monday - Friday 8am - 5:30pm GMT+7

Your time: 00:00:00
Our time: 00:00:00
Welcome, Guest

Adding custom attribute to home page listing tabs
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Adding custom attribute to home page listing tabs

Adding custom attribute to home page listing tabs 6 years ago #9800

Hi,

I have created a customer attribite on the product, called pack_qty and marked it as available from the front-end. I've got it appearing fine on the product detail and catalog listings pages, but how can I include it in the Listing Tabs module on the front page?

I've tried various permutations of $_product->(various-things) in the template, but while the boilerplate text I've added around the custom attribute line appears, the value of the attribute either doesn't appear, or the whole module disappears, depending on what I try.

I've tracked the relevant template down to /app/code/Sm/ListingTabs/view/frontend/templates/default_items.phtml, but will I need to add something to the block (/app/code/Sm/ListingTabs/Block/ListingTabs.php) as well?

Thanks.

Re: Adding custom attribute to home page listing tabs 6 years ago #9898

  • MT Tu
  • OFFLINE
    • Expired - MTC-Developer License
  • Single Product
  • Platinum Boarder
  • Posts: 637
  • Karma: 6
Dear David,

Thanks for contacting Magentech!
Normally, you no need to add anything to the block ListingTabs.php.
First, please make sure the attribute works fine in the listing page.
And make sure the file from Listing Tabs module is correct one.
You can use the Hint path tool to check it:
magento.stackexchange.com/questions/91235/where-is-template-path-hints-in-magento-2
And also please try to follow further this article below:
www.dckap.com/blog/display-custom-attribute-value-product-viewlist-page-magento-2/

Thanks and regards!

Re: Adding custom attribute to home page listing tabs 6 years ago #9923

Brilliant, that works fine. I didn't think of that simple a solution - I assume it is done through magic methods? Thanks for your help.

Re: Adding custom attribute to home page listing tabs 6 years ago #9981

  • MT Tu
  • OFFLINE
    • Expired - MTC-Developer License
  • Single Product
  • Platinum Boarder
  • Posts: 637
  • Karma: 6
Dear David,

Thanks for your feedback!
I'm glad your issue is solved. If you need any further assistance feel free to let us know.
By the way, if you are happy with our support service, as well as our theme, then please rate 5 stars on ThemeForest to help us. And kindly mention our Support Team in your comment . This will be greatly appreciated.
Below is the guide how to rate an item on Themeforest
www.magentech.com/documentation/how-to-rate-an-item-on-themeforest/

Thanks and Best regards!

Re: Adding custom attribute to home page listing tabs 4 months ago #46340

Thanks so much for your help. I really appreciate it. quordle games io

Re: Adding custom attribute to home page listing tabs 3 months, 2 weeks ago #46725

The information is very special, I will have to follow you.
cladder
  • Page:
  • 1
  • 2
Time to create page: 0.19 seconds
Google+
Joomla TemplatesFree Joomla TemplatesVirtuemart TemplatesK2 TemplatesJoomShopping TemplatesHikaShop TemplatesSobiPro TemplatesOpenCart Themes
Quà Tết Cao Cấp Hộp quà tết Giỏ quà tết Túi quà tết