Author Topic: automatic related product  (Read 92 times)

alireza

  • Beginner
  • *
  • Posts: 4
  • A beginner
automatic related product
« on: November 09, 2017, 09:31:06 am »
How can  i make automatic related product without add any product in coustom field tap in product ?

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 834
  • VirtueMart Version: VM3 on J3
Re: automatic related product
« Reply #1 on: November 10, 2017, 13:27:04 pm »
with a little bit php and html knowledge you can build your own template override and load related products of the same category

Code: [Select]
$productModel = VmModel::getModel('product');
$catProducts = $productModel->getProductsInCategory($this->product->virtuemart_category_id);