Create product tab for one attribute while leaving the others on another tab

Posted By saturation Thu 25 Aug 2011
Add to Favorites0

Create product tab for one attribute while leaving the others on...

Author Message
saturation
 Posted Thu 1 Sep 2011
Supreme Being

Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
Got it....And it's working great!   Thank you so much Mohammad!
Mohammad
 Posted Wed 31 Aug 2011
Kartris Expert

Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Yeah the "20" need to be changed, as I told you in my previous post, it is the id of the attribute that you need to show in separate tab. Use the view "vKartrisTypeAttributes" to know the needed ATTRIB_ID and replace the "20" in both codes with that ATTRIB_ID.
saturation
 Posted Tue 30 Aug 2011
Supreme Being

Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
Ok, I was able to get the tab into place, but now it's not showing any data.   I followed the instructions you suggested.   It also appears that the other tab (the original attributes tab) still shows all of the attributes--even with the rowfilter set

dv.RowFilter = "ATTRIB_ID <> 20"

Do I need to query the database for something else than 20?  I'm not sure how this query works.
Mohammad
 Posted Fri 26 Aug 2011
Kartris Expert

Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)Kartris Expert - (80,911 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
There are different ways to do that, here is a simple one:

1. Use the "Front\ProductAttributes.ascx" as a guide to create another attribute control (for your chosen one) - (preferably to copy the control, and then give it another name like 'SeparateAttribute.ascx')

2. Create a new tab in the "Front\ProductView.ascx" control and place an instance of the created control in step no.1 above, don't forget to register the control at the top of the ProductView.ascx page, check the file for more details on how to do that.

Let us say your chosen attribute (that needs to be alone in the new tab) has the db ID (ATTRIB_ID) = 20

3. In "Front\ProductAttributes.ascx.vb"
Change this:
rptAttributes.DataSource = tblAttributes.DefaultView
rptAttributes.DataBind()

By this:
Dim dv As DataView = tblAttributes.DefaultView
dv.RowFilter = "ATTRIB_ID <> 20"
rptAttributes.DataSource = dv
rptAttributes.DataBind()


4. In the newly created control
Change this:
rptAttributes.DataSource = tblAttributes.DefaultView
rptAttributes.DataBind()

By this:
Dim dv As DataView = tblAttributes.DefaultView
dv.RowFilter = "ATTRIB_ID = 20"
rptAttributes.DataSource = dv
rptAttributes.DataBind()


Save your changes and here you go ..

There are other alternative ways, one could be applied to the same control, but it will be a bit confusing, another will require changing or creating stored procedures (if you have too many attributes), but the above one is very simple and straight forward if you have couple of attributes rather than many attributes.
saturation
 Posted Thu 25 Aug 2011
Supreme Being

Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)Supreme Being - (66,820 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
I need to create a separate tab on the product view specifically for one attribute and leave the other attributes in the other attributes tab.   Any idea on how to do this?

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top