ghostm3z LiteCart Fan Da Romania Membro dal ago 2014 ghostm3z 3 gen 2015 21:36 Hello, I am trying to display the category name of a product, instead of its manufacturer. I found the part of code where this should be replaced (it's located in func_draw.inc.php) but for some reason it doesn't display the way I would like it to. '. (($product['manufacturer_name']) ? $product['manufacturer_name'] : ' ') .'' . PHP_EOL So instead of> manufacturer_name I want to display category name the product belongs to. Can you please assist me?
litecart Main Crew Da Sweden Membro dal feb 2013 litecart 3 gen 2015 22:05 A product can be mounted in several categories. Do you wish to display them all or just the first one?
ghostm3z LiteCart Fan Da Romania Membro dal ago 2014 ghostm3z 3 gen 2015 22:31 Sorry if I wasn't clear enough in my first post. I am talking about any page where the products are being displayed. By default, underneath the product name, the manufacturer name is displayed. I want the category name instead of the manufacturer name. On all pages. I've attached an image so you could understand me better. In that case, ""Rubber Ducks"" should be displayed instead of ""ACME corp"".
litecart Main Crew Da Sweden Membro dal feb 2013 litecart 4 gen 2015 02:23 Try the following vqmod. Place it in vqmod/xml/category_name_in_listing.xml Category Name In Listing 1.0 2.4.0 litecart.net snippets = array( ]]> $product['manufacturer_name'], ]]> $first_category->name[language::$selected['code']], ]]> ]]> ]]>
ghostm3z LiteCart Fan Da Romania Membro dal ago 2014 ghostm3z 4 gen 2015 13:11 Thank you for your quick response in this matter. I am using an older version of LiteCart (1.1.2) and don't have vqmod. I copied the files from the newer version of LiteCart regarding vqmod, and when I try to activate the XML file I get this error message Fatal error: Call to undefined method document::ilink() in /home/lite/public_html/mainsite/admin/vqmods.app/vqmods.inc.php on line 14 Could you point me in the right direction, possibly without upgrading to a newer version? Thank you!
litecart Main Crew Da Sweden Membro dal feb 2013 litecart 4 gen 2015 14:39 The new 1.2 files are not compatible to patch just some files. You need a complete upgrade if you wanna benefit from 1.2 functionality.
ghostm3z LiteCart Fan Da Romania Membro dal ago 2014 ghostm3z 4 gen 2015 22:14 Thank you for your responses. I eventually fixed it without having to upgrade to latest version. I just added $categories = explode(',', $product['categories']); $first_category = new ref_category(array_shift($categories)); to the file func_draw.inc.php and also replaced the line of code where the manufacturer was being displayed like so: '. $first_category->name[language::$selected['code']] .'' . PHP_EOL