Showing 61-80 of 219 items.

ePay Integration - Bulgarian Payment Provider

Created 13 years ago by yasen yasen, updated 13 years ago by yasen yasen. 2 comments

} ` V. The Order model would start with:

class Order extends CActiveRecord
{
	const STATUS_INITIATED = 1;
	const STATUS_CANCELED = 2;
	const STATUS_EXPIRED = 3;
	const STATUS_PAID = 4;
	public $statuses = array(
		self::STATUS_INITIATED => 'Initiated',
		self::STATUS_CANCELED => 'Canceled',
		self::STATUS_EXPIRED => 'Expired',
		self::STATUS_PAID => 'Paid',
	);
// more cod...
6 0
5
Viewed: 14 684 times
Version: 1.1
Category: Tutorials

CGridView, CListView and CActiveDataProvider

Created 13 years ago by softark softark, updated 13 years ago by softark softark. 22 comments

CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

26 0
33
Viewed: 151 631 times
Version: 1.1
Category: Tutorials

Simple way to use AutoComplete using different ID and Display Value

Created 14 years ago by raheelk2k raheelk2k, updated 14 years ago by raheelk2k raheelk2k. 5 comments

Usually when we use AutoComplete in a project, We need to show "title" or "name" in the list, while when the form is posted, we need some sort of integer ID referring to the selected value. Out of the Box, CJuiAutoComplete widget doesn't provides different display text and post values.

6 0
13
Viewed: 67 510 times
Version: 1.1
Category: Tutorials

Custom Number Formatting or Decimal Separators and i18n

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 8 comments

By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

4 0
16
Viewed: 94 951 times
Version: 1.1
Category: Tutorials