Jump to content

Prestashop-switch type radio button


Recommended Posts

  • 3 weeks later...

What are you having trouble with? When you get the value, just use something like

 

{if $value == 1}checked="checked"{/if}

 

In the radio's html, since you seem to have got to that point. You copied and pasted the html?

I'm having a problem with getting Boolean from database, every time i try i get blank pages

 

in product.php i add 

'course' => 	array('type' => self::TYPE_BOOL,  'validate' => 'isBool'),

every other type of data works, except for boolean

Link to comment
Share on other sites

 

 

WHat's the db column set to? Also, did you turn on error reporting? It should tell you what the error is

 

both are tinyint(1)  unsigned

it read correctly the value to display but when i try to save there is an error and it doesnt save the changes

An error occurred while updating an object. product ()

 

error reporting is on but it doesnt show an error 

Edited by admin@iksi (see edit history)
Link to comment
Share on other sites

Glad it works! It depends on what you do when you copy the other page. Are all needed variables assigned in the controller?

i'm not sure how to do it all as i need a public registration page for employees. but when i copy the client registration page date of birth, page name and gender don't work

the question is here

https://www.prestashop.com/forums/topic/468441-creating-public-employee-registartion-page/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...