Questions tagged [cakephp-3.2]

Questions about the 3.2.x branch of the CakePHP MVC framework. Use this tag in combination with the general [cakephp] tag. If your question applies to CakePHP more generally, use only the [cakephp] tag.

CakePHP 3.2

CakePHP is a PHP development framework using Associative Data Mapping, Front Controller and MVC design patterns.

Version 3.2.0 was released in January 2016.

Resources

145 questions
0
votes
1 answer

Cakephp 3 - Auth session cannot destroy

I use Cakephp 3.2.11 on Cloud 9 IDE server. When I logged out to my app via Auth component. I didn't log in again but I tried to access some pages. It was appeared Auth session login request like: (I didn't design it) I type username & password…
TommyDo
  • 663
  • 8
  • 23
0
votes
1 answer

cakephp restrict action depending on user status

I'm using CakePHP 3.2 to develop seller panel. There is sellers table to store all details and credentials and there is a column status on integer type. status column is used to mark seller as approved or not like this 0 = Registered not approved 1…
Gaurav
  • 131
  • 12
0
votes
1 answer

CakePHP : query printing same values twice

I'm working on CakePHP 3.2. I have categories, products, seller_products table and their association are categories->hasMany('Products'); seller_products->hasMany('Products'); I have to retrieve all products group by category where…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

working with temporary table in cakephp 3

I'm working in CakePHP 3.2 I have a table Carts to store products in cart when user is logged in with user_id. I want addToCart accessible to user without login too. But in this case I want to use temporary table to store the cart data and when user…
Gaurav
  • 131
  • 12
0
votes
2 answers

join not working in CakePHP 3

I'm using this code in controller to get joined result instead of contain associated in CakePHP 3.2 $abc = $this->Products->SellerProducts->find('all', [ 'conditions' => [ 'Products.subcategory_id' => $id, …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

CakePHP 3 : multi level association

I have 3 tables, categories, products and seller_products and their associations are like CategoriesTable.php $this->hasMany('Products', [ 'foreignKey' => 'category_id' ]); ProductsTable.php $this->hasMany('SellerProducts', [ 'foreignKey' =>…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
0 answers

How to create "latest articles" block in CakePHP 3?

How to create block with "latest articles" with CakePhp 3.x? I'm learning by "blog tutorial" from official web-site. I already have controller "Articles" from tutorial: // src/Controller/ArticlesController.php namespace App\Controller; use…
0
votes
2 answers

how to stop saving data in associated tables in cakephp 3

i have a table(user table) which is associated to many tables. While saving data, it is getting saved in all associated table. But in some scenario i need to save only in base table (User) not in assoicatied table. In cakephp 2 we have option…
0
votes
0 answers

cakephp 3 how to use plugins (Imagine)

In my cake app a need Imagine but how I can create instance of class Imagine in Controller. Plugin was install by composer and all files are in vendor folder. This: require 'vendor/autoload.php'; $imagine = new Imagine\Gd\Imagine(); doesn't…
mcek
  • 480
  • 7
  • 17
0
votes
2 answers

Is there a way to programmatically make changes to your layout file?

I am currently working on a user navigation side panel and with it is a list of links, what I intend to find out is: is it possible to highlight/emphasize the list item that was clicked after the user is redirected all the while using the same…
0
votes
1 answer

CakePHP 3 : default validation not working

I am working in CakePHP 3.2. I have users table and register action in UsersController. I'm trying to add a new record but default validation is not working. This is my 'UsersTable.php`
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

Update related list with change in list in CakePHP 3

I have two tables categories and subcategories where categories hasMany subcategories relation. I have another table products which is related to categories and subcategories. In add method of products I want to select category from the list and…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
2 answers

Prevent CakePHP to create div with input field

Every time I create an input field using $this->Form->input('name'); It creates a div element
Is there a way to prevent creation of div block around input field. Also, is there a way to add…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

CakePHP 3 : payment gateway integration like instamojo

I want to integrate Instamojo Payment Gateway [github link] in my CakePHP 3 application. I'm new to CakePHP. Is there any good plugin to integrate this in the application or any other way to use it. I'm using CakePHP 3.2
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
0
votes
1 answer

CakePHP 3 : findById where greater than 0

I am paginating associated model in view() function of another model. public function view($id = null) { $category = $this->Categories->get($id, [ 'contain' => ['Subcategories'] ]); // paginate products …
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285