Jump to content

 

alebargut

Member Since 20 Oct 2009
Offline Last Active May 14 2018 07:41 PM
-----

Posts I've Made

In Topic: Adding short description to grid_list

19 November 2013 - 05:56 AM

Just finished this. I added a new block and list template and added the schema template.post.php and all these to the my_changes addon. Its working now. if anybody likes to get more details on how to create a new product listing template please let me know and i'll post more details...

In Topic: Adding short description to grid_list

19 November 2013 - 04:58 AM

Would be possible to create a new block template, list template and setup the schema addon using my_changes addon?

In Topic: Adding short description to grid_list

19 November 2013 - 04:51 AM

I figured this one out... Description details do not show on the block 'grid_list' template because it was not being pulled out on the block schemas file..

on /schemas/block_manager/template.php the code:

'params' => array (
'extend' => array('description'),
),

needs to be added to the 'blocks/products/grid_list.tpl' schema format in order to extend the product data being pulled to the array.

No my only question left would be is there any way to do this without modifying the core code?, There are no hooks in this file.

In Topic: How to get image_pair in a foreach loop

18 April 2013 - 04:33 AM

Got it sorted out!

The most important thing here i think, is the fact that (As far as i can See) the only way to get tpl to interact with an existing PHP core function is through this format, for example for my case:

{assign var="cat_main_pair" value=$item2.category_id|fn_get_image_pairs:category:M}

Run this on the tpl and you'll get your image pair information in $cat_main_pair, then you can get the thumbnail running:

{include file="common_templates/image.tpl" show_detailed_link=false object_type="subcategory" images=$cat_main_pair no_ids=true class="cm-thumbnails" show_thumbnail="Y" image_width="100" image_height=""}


I understand your concern tbirnseth but trying to run this in the controller becomes difficult for me as i do not know how to pass the category_id variable to the PHP controller from the TPL, unless we implement the whole controller:mode thing... Your thought on this will be appreciated.

In Topic: How to get image_pair in a foreach loop

18 April 2013 - 03:32 AM

Ok i am modifying the drop down menu to show just 1st and 2nd level categories with the thumbs on top of it. The problem with this is that since menu is on top of all pages i have to make it independent of controllers, in other words it needs to display in all controller/modes combination, where don't have more than the variable items, items1 and items2 in blocks/topmenu_dropdown.tpl. Then i need to get the image URL to place the thumb on top of the subcategory but $items does not contain image_pairs information in this template to be able to pull out the info.

Then following your advice i would create a php script to be able to pull out this info from the data base in the my_changes controller, but then again how do i send the variable to the function in php???

i hope you get the idea