Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Add apperance type to Product Filter Rate Topic   - - - - -

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 31 October 2011 - 03:24 PM #1

Does anyone know how I can add a new appearance type to Product Filters using an add_on. I thought
doing this in my structure.post.php would work but alas it did.

$schema['product_filters']['appearances']['blocks/pfilt.tpl'] = array (
				'conditions' => array (
					'fillings' => array('filters')
			),
);


 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 31 October 2011 - 03:40 PM #2

I finally figured it out and thought it would be a great idea to note it for other users
since I have seen others ask and never get an answer. For some reason it took me forever
to figure this out. In the end the solution was simpler than I expected.
You can use the existing my_changes add_on or your own add-on. First you need to add the
correct folders to the add-on.

1. Create a "schema" folder under (not the skins folder but the root of CS-Cart) /addons/my_changes/.
2. Create a "block_manager" folder under the "schema" folder you just created.
3. Create a structure.post.php file under "block_manager".
4. Add the appropriate code to the structure.post.php file.

For example: I wanted to create a new appearance type for Product Filters
using the "filters" filling. I created my new template under my
"customer/addons/my_changes" folder and called it filter_menu.tpl. Then to have
it appear when editing the blocks in the admin I added the following
code to the structure.post.php file. You can learn a lot by viewing the
/schemas/structure.php file to learn more about adding appearance types
and fillings to categories,products, etc...

<?php

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

$schema['product_filters']['appearances']['my_changes/filter_menu.tpl'] = array (
				'conditions' => array (
					'fillings' => array('filters')
			),
			
);
			
?>

Note: if anyone has a better way of doing this please chime in.

 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4699 posts

Posted 31 October 2011 - 03:52 PM #3

Thanks for the info...how does it look now do you have any shots.

thanks
john

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 31 October 2011 - 05:42 PM #4

Thanks for the info...how does it look now do you have any shots.

thanks
john





screen.gif

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 31 October 2011 - 06:27 PM #5

Where is the relevancy in your screenshot? The filters appear like that in my cart without any of your code integrated...?
Hire StellarBytes for CS-Cart Design & Development Services

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2316 posts

Posted 31 October 2011 - 06:47 PM #6

I think he's talking about the brands showing up?

When life hands you lemons, bring on the Tequila baby!


 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 31 October 2011 - 06:52 PM #7

I think he's talking about the brands showing up?

correct flow :)

 
  • m-space
  • Junior Member
  • Members
  • Join Date: 02-Jan 10
  • 20 posts

Posted 07 December 2011 - 01:31 PM #8

Thanks for this !

 
  • m-space
  • Junior Member
  • Members
  • Join Date: 02-Jan 10
  • 20 posts

Posted 07 December 2011 - 05:22 PM #9

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.

 
  • m-space
  • Junior Member
  • Members
  • Join Date: 02-Jan 10
  • 20 posts

Posted 07 December 2011 - 05:45 PM #10

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?

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 10 July 2012 - 01:53 PM #11

Your path to your tpl is incorrect it should be addons/my_changes/categories_new_multicolumns.tpl.

 
  • mmuller
  • Junior Member
  • Trial users
  • Join Date: 12-Oct 09
  • 8 posts

Posted 10 July 2012 - 02:00 PM #12

Your path to your tpl is incorrect it should be addons/my_changes/categories_new_multicolumns.tpl.


Solesurvivor,

Thanks for the reply, I had fixed it shortly after posting but forgotten all about this post in the meantime!

Regards