Post by merchboer » Mon Feb 07, 2011 6:21 pm

great post!

I likez teh beerz & foodz.


User avatar
Active Member

Posts

Joined
Fri Jan 14, 2011 4:27 pm
Location - Netherlands

Post by calvinplb » Mon Apr 18, 2011 2:06 am

thanks for the great mod.
I've managed to install it and got the feature
however got an error when i go to opencart admin, go to Catalog > Products

instead of showing the price tab it show this error:

Notice: Undefined index: special in /home/database/public_html/mywebpage/shop/admin/view/template/catalog/product_list.tpl on line 85 Notice: Undefined index: price in /home/database/public_html/mywebpage/shop/admin/view/template/catalog/product_list.tpl on line 88

what did i do wrong ?
i've used the Auto install feature.
I've created some sample product in my site before adding this mod, is it due to that ?

any advice is deeply appreciated. thks

Newbie

Posts

Joined
Sat Apr 16, 2011 10:48 pm

Post by SXGuy » Mon Apr 18, 2011 3:17 pm

Its not the mod thats caused the error, because my mod does nothing to the special or price.

What is auto install feature? this was written to manually install.

Sample products dont affect this mod.

My advise would be to start again. It appears you did something which wasnt written in this tutorial.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by BAJR » Tue Aug 09, 2011 4:39 am

the catalog\model\catalog\product.php seems to have changed..

to $query = $this->db->query("SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$customer_group_id . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$customer_group_id . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM " . DB_PREFIX . "product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '" . (int)$customer_group_id . "') AS reward, (SELECT ss.name FROM " . DB_PREFIX . "stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '" . (int)$this->config->get('config_language_id') . "') AS stock_status, (SELECT wcd.unit FROM " . DB_PREFIX . "weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS weight_class, (SELECT lcd.unit FROM " . DB_PREFIX . "length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS length_class, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM " . DB_PREFIX . "review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'");

So the ss.name AS stock, video FROM

no longer works? any suggestions? this is for 1.5

cheers... nice mod..

New member

Posts

Joined
Sun Jul 12, 2009 6:17 pm

Post by SXGuy » Tue Aug 09, 2011 4:28 pm

just add it here

Code: Select all

$query = $this->db->query("SELECT DISTINCT *, pd.name AS name, video.....
Should be fine, so long as its listed

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by BAJR » Wed Aug 10, 2011 2:23 am

top ... cheers
lets see if that works!

New member

Posts

Joined
Sun Jul 12, 2009 6:17 pm

Post by dan74mm » Wed Jan 11, 2012 7:04 pm

I need this tool for OpenCart v1.5.1.2. It is working on OpenCart v1.5.1.2 ?

New member

Posts

Joined
Sat Oct 22, 2011 11:08 am

Post by ashutosh.5986 » Thu Apr 05, 2012 5:36 pm

i did'nt find


Locate

Code: Select all
ss.name AS stock FROM



replace with

Code: Select all
ss.name AS stock, video FROM
so,please help me out in that if possible...

Newbie

Posts

Joined
Thu Apr 05, 2012 5:34 pm

Post by alok » Mon Jul 29, 2013 3:43 pm

BAJR wrote:top ... cheers
lets see if that works!
@BAJR did it work for you ?

@SXGuy I tried this but it didnt work for me

Code: Select all

$query = $this->db->query("SELECT DISTINCT *, pd.name AS name, [b]video[/b], p.image, m.name AS manufacturer,......
Any updates for Opencart 1.5 and later versions.?

@ashutosh.5986 Did you find any other solutions?

Newbie

Posts

Joined
Mon Jul 29, 2013 3:34 pm
Who is online

Users browsing this forum: No registered users and 15 guests