Quick question: I added a column to ac_Products which is called "Rarity" and has 4 possible string values: R, U, C, or M
I need to be able to get this column to show on batch edit. I've tried to the best of my ability and I end up always looking at Products metadata. Here's what I've done so far:
On ../Admin/Products/Batching/BatchEdit.aspx.csm added the following code which generated the field "rarity":
Code: Select all
private void InitializeFieldSelections()
{
// BUILD THE LIST OF AVAILABLE FIELDS
_ProductFields["rarity"] = "Rarity"; // ADDED LINE
Code: Select all
// SET FIELD DESCRIPTIONS
_ProductFieldDescriptions["rarity"] = "Product Rarity"; // ADDED LINE
And added the "rarity" case to the drawfields like so:
Code: Select all
private List<Control> DrawField(Product product, string field, out string cellAlignment)
{
cellAlignment = string.Empty;
if (field != null)
{
string cleanField = field.Trim().ToLowerInvariant();
switch (cleanField)
{
case "rarity": // ADDED LINE
return DrawTextField(product.ProductId, cleanField, "R", 255, 200, false); // ADDED LINE
What I need to accomplish is to get rid of the "R" and substitute it with something like product.Name but for the Rarity column.
I really need some guidance on how to go on with this part of the process; If I had an idea I wouldn't post for help.
Thank you in advance for your time and attention!
Bladegrasp~