News:

Looking for documentation? Take a look on our wiki

Main Menu

releated products

Started by tomas.ch, November 21, 2013, 03:20:46 AM

Previous topic - Next topic

tomas.ch

Hello,
I want to ask if there is any reasonable way to edit related products? Related products are generated in the file default_relatedproducts.php using the $ field-> display. Unfortunately, I don´t know about any way to edit this function so that I´m trying to deal with it by using php functions (regular expressions, explode, str_replace, etc.) to extracted at least some data from this function such as the title or the image. But there is problem with geting a short description and price. Price and short_desc aren´t in the $field. This field contain only a limited amount of data, but one of them is the product id. Do you think than there is possible way to getthe price and description of the product by using procust id? Or is there a simpler way than this crazy one that I´m using?
Thanks for any ideas
sorry for my very bad english

GJC Web Design

$product_model = VmModel::getModel('product');
$product = $product_model->getProduct($id,TRUE,TRUE,TRUE,$quantity);

//public function getProduct ($virtuemart_product_id = NULL, $front = TRUE, $withCalc = TRUE, $onlyPublished = TRUE, $quantity = 1,$customfields = TRUE)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation