Question : php like zen cart want return to be categories instead of products

looking for a solution that works out of the box.  don't want to customize too much.  shopping car solution prefer php

i like zen cart but don't want to modify it.  

the problem is i want the results to be in categories instead of by products.

anyone know of a cart already made that will do this?

Answer : php like zen cart want return to be categories instead of products

Well, you're going to have some unexpected behavior if you're using the *_SelectedIndexChanged() event to set the value of a control. At the very least you can expect unnecessary roundtrips through the code which may produce different values than you're actually expecting. Also, the general best practice is to use ViewState() to store values if you're not leaving a page, then use Session() to store values that need to be shared between pages. Give this, I would try something like the following... and please note this is completely untested. I don't have the Telerik controls to verify this, but this general framework will do what you're looking for (may require a little tweaking to perfect)...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
private const string CATEGORY = "CategoryId";
private const string SUBCATEGORY = "SubCategoryId";
private const string VIDEO = "VideoId";

protected void Page_Load(object sender, EventArgs e)
{
	if (IsPostBack) return;
	
	InitializeElements();
	LoadContinents();
	PopulateControls();
}

private static void InitializeElements()
{
	// are these true Session objects? Right now they appear to be simple variables.
	Geek.XTV7_Categories_ID = string.Empty;
	Geek.XTV7_Categories_Sub_ID = string.Empty;
	Geek.XTV7_Videos_ID = string.Empty;
	
	ViewState.Remove(CATEGORY);
	ViewState.Remove(SUBCATEGORY);
	ViewState.Remove(VIDEO);
	
    RadGrid1.Visible = false;
}

private void PopulateControls()
{
	RadGrid1.Visible = false;
	
	if(ViewState[CATEGORY] != null && !string.IsNullOrEmpty((string)ViewState[CATEGORY]))
	{
		var tempCategory = (string)ViewState[CATEGORY];
        LoadCountries(tempCategory);
        Label4.Text = tempCategory;
		
		var tempC1 = RadComboBox1.Items.FindByValue(tempCategory);
		if(tempC1 != null) tempC1.Selected = true;
	}
	
	if(ViewState[SUBCATEGORY] != null && !string.IsNullOrEmpty((string)ViewState[SUBCATEGORY]))
	{
		var tempSubCategory = (string)ViewState[SUBCATEGORY];
        LoadCities((tempSubCategory);
        Label5.Text = tempSubCategory;
		
		var tempC2 = RadComboBox2.Items.FindByValue(tempSubCategory);
		if(tempC2 != null) tempC2.Selected = true;
	}
	
	if(ViewState[VIDEO] != null && !string.IsNullOrEmpty((string)ViewState[VIDEO]))
	{
		var tempVideo = (string)ViewState[VIDEO];
        BindData(tempVideo);
        Label6.Text = tempVideo;
		
		var tempC3 = RadComboBox3.Items.FindByValue(tempVideo);
		if(tempC3 != null) tempC3.Selected = true;
	}
}

private void BindData(string videoId)
{
	// this line should be added before your RadGrid1.DataBind()
	RadGrid1.Visible = true;
		
	//keep your existing logic, but add the following block somewhere in this method...
	#region Session Variables
	Geek.XTV7_Categories_ID = (string)ViewState[CATEGORY];
	Geek.XTV7_Categories_Sub_ID = (string)ViewState[SUBCATEGORY];
	Geek.XTV7_Videos_ID = (string)ViewState[VIDEO];
	#endregion
}

#region RadComboBox SelectedIndex Changed
protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
	ViewState.Remove(CATEGORY);
	ViewState.Remove(SUBCATEGORY);
	ViewState.Remove(VIDEO);
	
	ViewState.Add(CATEGORY, RadComboBox1.SelectedValue.Trim());
	PopulateControls();
}

protected void RadComboBox2_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
	ViewState.Remove(SUBCATEGORY);
	ViewState.Remove(VIDEO);
	
	ViewState.Add(SUBCATEGORY, RadComboBox2.SelectedValue.Trim());
	PopulateControls();
}

protected void RadComboBox3_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
	ViewState.Remove(VIDEO);
	
	ViewState.Add(VIDEO, RadComboBox3.SelectedValue.Trim());
	PopulateControls();
}
Random Solutions  
 
programming4us programming4us