Author Topic: Showing Item Manufacturer on Homepage  (Read 4129 times)

Offline enochsuthers

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Showing Item Manufacturer on Homepage
« on: January 06, 2017, 07:55:28 AM »
I am having an issue trying to show the Manufacturer of each item on the home page.

In the product_list I added echo $item['manufacturer'] but nothing shows up, following the example of other pages using $manufacturer and $text_manufacturer do not bring the desired effect either.

I have been struggling with this for a few days now

worldbeautyquest.com


Offline enochsuthers

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Showing Item Manufacturer on Homepage
« Reply #1 on: January 11, 2017, 07:50:15 PM »
Gentle Bump

Offline hus2020

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: Showing Item Manufacturer on Homepage
« Reply #2 on: January 25, 2017, 04:00:23 AM »
I am having an issue trying to show the Manufacturer of each item on the home page.

In the product_list I added echo $item['manufacturer'] but nothing shows up, following the example of other pages using $manufacturer and $text_manufacturer do not bring the desired effect either.

I have been struggling with this for a few days now

worldbeautyquest.com

Hi looks like you were able to add the manufacturer name on your products. Can you advice what change u did to the file. Thanks


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Showing Item Manufacturer on Homepage
« Reply #3 on: January 25, 2017, 01:40:18 PM »
Let me go with an example of featured block. Others will be similar.

Controller:
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/blocks/featured.php
Line: 47

Here you get array of featured items based on limit set in settings.
If you look at the model method getfeaturedProducts() there is no join with manufacture table.
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/catalog/product.php
Line:754

What you need to do is call $this->model_catalog_product->getProduct(...product id...) to get full product details. ['manufacturer'] will be there.
This will need to be inside the foreach loop for the product or outside to get all at once.

To improve performance, you might want to create a better select to get all manufactures for provided products.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline hus2020

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: Showing Item Manufacturer on Homepage
« Reply #4 on: January 26, 2017, 08:15:44 PM »
Let me go with an example of featured block. Others will be similar.

Controller:
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/blocks/featured.php
Line: 47

Here you get array of featured items based on limit set in settings.
If you look at the model method getfeaturedProducts() there is no join with manufacture table.
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/catalog/product.php
Line:754

What you need to do is call $this->model_catalog_product->getProduct(...product id...) to get full product details. ['manufacturer'] will be there.
This will need to be inside the foreach loop for the product or outside to get all at once.

To improve performance, you might want to create a better select to get all manufactures for provided products.

Hi,
Can you guide me with the variable name if I want to call and display the store name and store address. I basically want to show store name and store address at the order summary preview. Thanks

 

Powered by SMFPacks Social Login Mod