Jump to content

m-space's Content

There have been 5 items by m-space (Search limited from 24-Jan 19)


Sort by                Order  

#127450 Add apperance type to Product Filter

Posted by m-space on 07 December 2011 - 05:45 PM in General Questions

Okay well I created a specific_settings.post.php with the following

<?php

if ( !defined('AREA') ) { die('Access denied'); }

$schema = array (
	'appearances' => array (
	'my_changes/categories_new_multicolumns.tpl' => array (
			'number_of_columns' =>  array (
				'type' => 'input',
				'default_value' => 2
			)
		)
	)
)
?>

Which now shows the options in the 'specific settings' menu for the new option

But for some reason the new template is not being called in the page block in the frontend.

Any ideas?



#127447 Add apperance type to Product Filter

Posted by m-space on 07 December 2011 - 05:22 PM in General Questions

Thanks for this !


Although in trying to extend the Category listings it goes a bit wrong...

I have

$schema['categories']['appearances']['my_changes/categories_new_multicolumns.tpl'] = array (
                                'params' => array (
                                        'get_images' => true
                                      )
);

In my code which is the same as the code from structure.php but reformatted. The problem that occurs is that it doesn't show the specific settings for the new multicolumn option so I am unable to set the required quantity and then there is no output !

Any advice is greatlt appreciated.



#127438 Add apperance type to Product Filter

Posted by m-space on 07 December 2011 - 01:31 PM in General Questions

Thanks for this !



#127437 How to add a new "Appearance type" in Blocks

Posted by m-space on 07 December 2011 - 01:09 PM in Hints & Modifications

+1 for this



#126721 Form Main Menu from Categories - Without using Top Menu

Posted by m-space on 25 November 2011 - 12:40 PM in Developers' Corner

Hi All,

I had been working with CS-Cart's tech support but they have now told me its too much to cover under TS! Brilliant... however the code is somewhat working but just needs a little extra 'pizzaz'

In controllers/customer/ init.php I have:

// Added to Allow Top Menu Categories to be displayed as Main Menu
@list($top_menu_categories, ) = fn_get_categories();

//This is the line that needs extra development - I think...
//$top_menu_categories = fn_top_menu_form( fn_get_static_data_section('A', true) );

$top_menu_categories = fn_top_menu_select( $top_menu_categories, $controller, $mode, Registry::get('current_url') );
$view->assign('top_menu_categories', $top_menu_categories);

And then in my_changes I have:

	{assign var="foreach_name" value="cats_$cid"}
		<ul id="main-menu">
		{foreach from=$top_menu_categories item="category" name=$foreach_name }
			<li class = "{if $smarty.foreach.$foreach_name.first}first {/if}{if $category.selected == true }cm-active{/if}"><a href="{"categories.view?category_id=`$category.category_id`"|fn_url}">{$category.category}</a></li>
		{/foreach}
		</ul>

That runs as expected and produces an unordered list of the top level categories in the site for navigation, however and this is the part where tech support bailed on me - it currently does not highlight the currently viewed page - the cm-active class is missing - {if $category.selected == true }cm-active{/if} .selected does not exist in the returned data because the menu is not being parsed by either

fn_top_menu_form or fn_top_menu_select

I have tried ( see the commented out line in the first code section ) to parse the data through fn_top_menu_form and then fn_top_menu_select but it does nothing or at worst returns no menu items...

Can anyone help with getting this working? Personally I am amazed with Tech Support only offering half an answer and two that this is not an option in the main system!

I look forward to any help resolving this...

MM