Jump to content

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

What Is A Feature Code And Why Isn't It In $Features Object? Rate Topic   * * * * * 1 votes

 
  • fdo
  • Member
  • Members
  • Join Date: 12-Aug 15
  • 42 posts

Posted 07 April 2016 - 06:51 PM #1

So I'm trying to access a Brand/Mfg feature in a sane way to make a trigger for some logic. I see there is a "feature code" available in backend. There is no information about this anywhere in docs though.

 

What does it do? What is it for? Why isn't it available in $features object/array at say, design/themes/*/templates/views/products/components/product_features_short_list.tpl?

 

Im asking this because, when brand is available, the features area at the top of a product page redirects into the parent category with brand filter selected, instead into the full results of the brand page itself. There needs to be an additional IF to account for this, and that IF needs some kinda sane trigger besides a feature id or language string name.

 

Thanks.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19057 posts

Posted 08 April 2016 - 07:36 AM #2

So I'm trying to access a Brand/Mfg feature in a sane way to make a trigger for some logic. I see there is a "feature code" available in backend. There is no information about this anywhere in docs though.

 

What does it do? What is it for? Why isn't it available in $features object/array at say, design/themes/*/templates/views/products/components/product_features_short_list.tpl?

 

Im asking this because, when brand is available, the features area at the top of a product page redirects into the parent category with brand filter selected, instead into the full results of the brand page itself. There needs to be an additional IF to account for this, and that IF needs some kinda sane trigger besides a feature id or language string name.

 

Thanks.

 

Feature code is similar to product code. it is used to identify the product feature. We have also made a search over the files and found that at the moment this code is used only by the YML Export module which is a part of the CS-Cart Russian Build


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fdo
  • Member
  • Members
  • Join Date: 12-Aug 15
  • 42 posts

Posted 08 April 2016 - 02:21 PM #3

Ah cool, thanks I thought I was crazy (didn't see it in store at all). I will work on making it available in the build we have too.

 

Is there an object/array dump/trace func already in CS for debug besides the GUI? Right now we use this https://gist.github....328dbe312f6c0de(even smarty side since their debug_print_var is junk). Wasn't sure if there was something more robust in the CS debug/error/exception handler that could be used instead. I dont like the debug mode GUI, it's too heavy and slow, and can't be used on a production store running since anyone can see it.

 

Note: if anyone needs dumps on production TPL's, are behind minifier which removes comments, and you can't exit(), try this with the above x_r():

 

<script type="text/javascript" data-no-defer>
/*{$object|@x_r:false}*/
</script>

 

Thanks.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19057 posts

Posted 08 April 2016 - 02:48 PM #4

Is there an object/array dump/trace func already in CS for debug besides the GUI? Right now we use this https://gist.github....328dbe312f6c0de(even smarty side since their debug_print_var is junk). Wasn't sure if there was something more robust in the CS debug/error/exception handler that could be used instead. I dont like the debug mode GUI, it's too heavy and slow, and can't be used on a production store running since anyone can see it.

 

To debug code please use fn_print_r or fn_print_die functions

 

PHP

fn_print_r($data);

JS

fn_print_r($data);

TPL

{$data|fn_print_r}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • imac
  • Head of Product
  • CS-Cart Architects
  • Join Date: 22-Nov 05
  • 2046 posts

Posted 12 April 2016 - 06:51 AM #5

Ah cool, thanks I thought I was crazy (didn't see it in store at all). I will work on making it available in the build we have too.
 
Is there an object/array dump/trace func already in CS for debug besides the GUI? Right now we use this https://gist.github....328dbe312f6c0de(even smarty side since their debug_print_var is junk). Wasn't sure if there was something more robust in the CS debug/error/exception handler that could be used instead. I dont like the debug mode GUI, it's too heavy and slow, and can't be used on a production store running since anyone can see it.
 
Note: if anyone needs dumps on production TPL's, are behind minifier which removes comments, and you can't exit(), try this with the above x_r():
 
 

<script type="text/javascript" data-no-defer>
/*{$object|@x_r:false}*/
</script>
 
Thanks.

This should help: http://docs.cs-cart..../debugging.html
Ilya Makarov,
CS-Cart Architect Team
Suggest and vote for new features | Report a bug