Jump to content

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

Display Layout For Controller Rate Topic   - - - - -

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 25 December 2019 - 11:35 PM #1

Hi, I'm a newbie. I created a new controller in controllers folder and created a new layout , dispatch to this new controller. But when I run, I just receive 404 layout on this page. I try to find something wrong, but don't know what it is. Is there anything similar guide or question on forum? Please help, thank you.



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1015 posts

Posted 26 December 2019 - 12:40 PM #2

Hello

 

By default, each controller looks for a .tpl template that can be displayed. If it doesn't find it, it shows this error.
You can prevent this by typing exit; after the actions you do in the controller.
If your dispatch=my_controller.update then the update.tpl file is searched in the appropriate directory.
 
If you create controller on frontend you should create template
design/themes/responsive/templates/addons/you_addons/views/your_controller/your_mode_controller.tpl
 
If you create controller on backend you should create template
design/bankend/templates/addons/you_addons/views/your_controller/your_mode_controller.tpl
 
 
Best regards
Robert

Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


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

Posted 26 December 2019 - 01:55 PM #3

Hi, I'm a newbie. I created a new controller in controllers folder and created a new layout , dispatch to this new controller. But when I run, I just receive 404 layout on this page. I try to find something wrong, but don't know what it is. Is there anything similar guide or question on forum? Please help, thank you.

 

If the previous advice does not help you, please provide us with the full path to new files and templates


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 30 December 2019 - 03:07 AM #4

@photo-13805.jpg?_r=0 Very thanks your advice, it helps me a lot. It's correctly that I intend to create my custom addon, including controller, template, and block. With your help, I created controller and view success, but not for block.

 

I read documents, references some posts on forum, but still not load my block template when creating block. 

 

Can you give me some advices?



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1015 posts

Posted 05 January 2020 - 10:45 AM #5

Hello

 

You are welcome :)

 

Describe more precisely what you want to do. What block is this and what content it should have.

 

Best regards

Robert.


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 06 January 2020 - 01:57 AM #6

@photo-13805.jpg?_r=0 , I created controller in addon, and created block from template is ok for now. But I still don't know how to make a block, that can be confgured params in admin panel, and how variables can pass to block template independently with controller ( $block.content...., I found it pass like this). I do research for tutorial, but still not find it yet. Can you show me some advices? 

 

Thanks a lot.



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

Posted 06 January 2020 - 06:01 AM #7

Please check my answer here

 

https://forum.cs-car...rt/#entry323382


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 06 January 2020 - 07:42 AM #8

Please check my answer here

 

https://forum.cs-car...rt/#entry323382

Many many thanks  for your advice :D



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

Posted 06 January 2020 - 01:39 PM #9

You are welcome!


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 07 January 2020 - 03:20 PM #10

@eComLabs, @soft-solid,

 

How can I save profile field value with html format, and display profile value with html format on frontend?



 
  • soft-solid
  • Junior Member
  • Authorized Reseller
  • Join Date: 19-Apr 10
  • 1015 posts

Posted 07 January 2020 - 03:26 PM #11

Hello

 

I'm afraid that's not possible. Do you mean the profile field or the value of the profile field?

 

Best regards

Robert


Team of SoftSolid
cs-cart.pl, marketplace

We specialize in creating the highest quality addons, safe, useful and flexible


 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 08 January 2020 - 02:39 AM #12

yes, that's it. I created profile field as textarea field, turn on ceEditor with  $('textarea').ceEditor();

 

But when save done, it ignore all html tag, just save normal text



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

Posted 08 January 2020 - 06:39 AM #13

Some code modifications are required to enable html tags for profile fields. But it is strongly not recommended due to security reasons


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 08 January 2020 - 07:55 AM #14

So you mean that profile field just save normal text by default,  but I can hook this flow, but don't do this for security reasons, is it right?



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

Posted 08 January 2020 - 01:51 PM #15

So you mean that profile field just save normal text by default,  but I can hook this flow, but don't do this for security reasons, is it right?

 

Right. Received data is filtered due to possible hacks


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    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • kyo00710
  • Newbie
  • Trial users
  • Join Date: 25-Dec 19
  • 12 posts

Posted 09 January 2020 - 04:49 AM #16

Thanks. May be I will find another way