Hi All,
This is an update of the related products contrib from jarek from http://forum.opencart.com/index.php/topic,1244.0.html this thread, to work with openCart 0.7.9-RC3.
Ive also added images with related products.
Thanks
Mike
This is an update of the related products contrib from jarek from http://forum.opencart.com/index.php/topic,1244.0.html this thread, to work with openCart 0.7.9-RC3.
Ive also added images with related products.
Thanks
Mike
I receive that error at the top of the page of items with related products once all updated are madeNotice: Undefined index: min_qty in /home/ambassad/public_html/store/opencart/catalog/controller/product.php on line 92
any suggestions?
afc@ambassadorfamily.com
Last edited by ambassador on Tue Dec 09, 2008 10:07 am, edited 1 time in total.
============here is line 27 ============Fatal error: Call to undefined method Request::gethtml() in /home/ambassad/public_html/store/opencart/catalog/controller/product.php on line 27
$product_info = $database->getRow("select * from product p left join product_description pd on (p.product_id = pd.product_id) left join image i on (p.image_id = i.image_id) where p.product_id = '" . (int)$request->gethtml('product_id') . "' and pd.language_id = '" . (int)$language->getId() . "' and p.date_available < now() and p.status = '1'");
In admin/controller/product.php in function getform,
Do we need to change the get to gethtml. ??
// Related products
$related_data = array();
$results = $database->getRows("select p.product_id, pd.name from product p left join product_description pd on (p.product_id = pd.product_id) where pd.language_id = '" . (int)$language->getId() . "'");
foreach ($results as $result) {
if (($request->get('product_id')) && (!$request->isPost())) {
$related_info = $database->getRow("select * from related_products where product_id = '" . (int)$request->get('product_id') . "' and related_product_id = '" . (int)$result['product_id'] . "'");
}
$related_data[] = array(
'product_id' => $result['product_id'],
'name' => $result['name'],
'related' => (isset($related_info) ? $related_info : in_array($result['product_id'], $request->get('related', 'post', array()))));
}
$view->set('related', $related_data);
// End related products
Do we need to change the get to gethtml. ??
// Related products
$related_data = array();
$results = $database->getRows("select p.product_id, pd.name from product p left join product_description pd on (p.product_id = pd.product_id) where pd.language_id = '" . (int)$language->getId() . "'");
foreach ($results as $result) {
if (($request->get('product_id')) && (!$request->isPost())) {
$related_info = $database->getRow("select * from related_products where product_id = '" . (int)$request->get('product_id') . "' and related_product_id = '" . (int)$result['product_id'] . "'");
}
$related_data[] = array(
'product_id' => $result['product_id'],
'name' => $result['name'],
'related' => (isset($related_info) ? $related_info : in_array($result['product_id'], $request->get('related', 'post', array()))));
}
$view->set('related', $related_data);
// End related products
Brent
Related Products 7.9-RC5
admin/controller/product.php
function delete()
if (($request->gethtml('product_id')) && ($this->validateDelete())) {
You need to add the following for product deletes
$database->query("delete from related_products where product_id = '" . (int)$request->gethtml('product_id') . "'"); // Related Products
admin/controller/product.php
function delete()
if (($request->gethtml('product_id')) && ($this->validateDelete())) {
You need to add the following for product deletes
$database->query("delete from related_products where product_id = '" . (int)$request->gethtml('product_id') . "'"); // Related Products
Brent
First and second don't need to be as they aren't actually being used, just checked, third probably should be, but it's not that important as it's part of the admin area.bthirsk wrote: In admin/controller/product.php in function getform,
Do we need to change the get to gethtml. ??
// Related products
$related_data = array();
$results = $database->getRows("select p.product_id, pd.name from product p left join product_description pd on (p.product_id = pd.product_id) where pd.language_id = '" . (int)$language->getId() . "'");
foreach ($results as $result) {
if (($request->get('product_id')) && (!$request->isPost())) {
$related_info = $database->getRow("select * from related_products where product_id = '" . (int)$request->get('product_id') . "' and related_product_id = '" . (int)$result['product_id'] . "'");
}
$related_data[] = array(
'product_id' => $result['product_id'],
'name' => $result['name'],
'related' => (isset($related_info) ? $related_info : in_array($result['product_id'], $request->get('related', 'post', array()))));
}
$view->set('related', $related_data);
// End related products
This is a remake of Related Products for 7.9 RC6.
It is a stand alone module similar to Latest/Featured/Specials.
It is designed as a companion to be used with Latest/Featured/Specials.
It does require LFS contribution to be installed first.
What it does:
It will allow displaying Related products where ever you desire on the products page.
It allows including Specials on the product page, in a third colum or under the current
product, where specials are replaced by related products it 'related' is set for the
current product.
Total number of related products to display is set in admin.
If the number of related products of the current PRODUCT exceeds the number to display,
related products are randomly chosen.
The readme file in the attached zip further explains features.
It is a stand alone module similar to Latest/Featured/Specials.
It is designed as a companion to be used with Latest/Featured/Specials.
It does require LFS contribution to be installed first.
What it does:
It will allow displaying Related products where ever you desire on the products page.
It allows including Specials on the product page, in a third colum or under the current
product, where specials are replaced by related products it 'related' is set for the
current product.
Total number of related products to display is set in admin.
If the number of related products of the current PRODUCT exceeds the number to display,
related products are randomly chosen.
The readme file in the attached zip further explains features.
Brent
I am referring to the catalog output.
the controller file is module/related.php and the template is module/related.tpl
They are separate files not embedded in the product.php which facilitates the features above.
the controller file is module/related.php and the template is module/related.tpl
They are separate files not embedded in the product.php which facilitates the features above.
Brent
attempted to install the LFS Contribution
uploaded all the files - ok
ran the myPHP to add sql - ok
can see the modules in the admin page - ok
cannot add the module by pressing "+" key - Not OK
Permission Denied!
You do not have permission to access this page, please refer to your system administrator.
any suggestions
uploaded all the files - ok
ran the myPHP to add sql - ok
can see the modules in the admin page - ok
cannot add the module by pressing "+" key - Not OK
Permission Denied!
You do not have permission to access this page, please refer to your system administrator.
any suggestions
after installing the module and sql i was unable to install the module from the admin page
i received an error
go to Admin -> Configuration -> users -> user groups
and enable permission for the new modules installed
then go back and configure them
i received an error
solution:Permission Denied!
You do not have permission to access this page, please refer to your system administrator.
go to Admin -> Configuration -> users -> user groups
and enable permission for the new modules installed
then go back and configure them
Who is online
Users browsing this forum: No registered users and 13 guests