Forums / Setting Up Categories, Products, Attributes / Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Started by juhanuha on 25 May 2013, 8:02 PM · Views: 1,739

Results 1 to 16 of 16
25 May 2013, 8:02 PM
#1
juhanuha avatar

juhanuha

New Zenner

Join Date:
May 2013
Posts:
6
Plugin Contributions:
0

Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Hi,

struggled with this for a few days now.

Ie. selling t-shirts with printable pictures.
Customer selects shirt what he likes, chooses first attribute (size) and then second attribute (picture to print on the shirt).
Shirt sizes has stock levels, but pictures obviously does not.

It is necessary to show stock levels, I managed to get them up with Stock By Attribute, but when there's 2 attributes, the second one did not appear at all and the stock levels were also funny because there also needed to set quantities for pictures, that did not need quantity.

This could also happen with one dropdown menu that lists all the sizes and pictures, but it really needs to show what is on the stock.

25 May 2013, 10:57 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Best asked in the 3rd party addon - stock by attributes support thread
Where you issue may have already been answered

Zen-Venom Get Bitten

26 May 2013, 3:12 PM
#3
juhanuha avatar

juhanuha

New Zenner

Join Date:
May 2013
Posts:
6
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

I'm not looking support for BSA module :)

Looking for a solution for my problem :)

27 May 2013, 1:20 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Looking for a solution for my problem
I managed to get them up with Stock By Attribute
You are asking in "Setting Up Categories, Products, Attributes" which is for default code questions and you are using the 3rd party addon "stock by attributes"
Look at the support thread for it where your issue may have already been answered which is here
http://www.zen-cart.com/showthread.php?47180-Stock-by-Attribute-v4-0-addon-for-v1-3-5-1-3-9

Zen-Venom Get Bitten

27 May 2013, 1:43 AM
#5
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

I believe I'm feeling Juhanuha's pain and can not find a solution anywhere.

Here is my issue...I'm really stumped and could use some help. I am not using any third party attribute controls. I am using EasyPopulate 4.0 and Database Backup plug-ins...don't think they have anything to do with this issue.

I have various clothing items for which only one picture is provided by my dropshipper for multiple sizes and colors. This causes the same image to be viewed multiple time by my shoppers and it is very annoying. So, I used ZenCart Admin to make all but one of the similar products inactive and used the attribute controller to indicate the various sizes and colors on the active product. That solved the repeating picture issue while browsing the shop....however......

If a customer orders a size or color that is out of stock (other than the active product size), then ZenCart will not stop the order from happening.

Is there a way to link inactive product prices, sizes, colors, or other attributes with the active displaying product?

27 May 2013, 2:15 AM
#6
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

More info for the above post.

I spent the last 2 days writing an Excel macro that broke down my apparel products by size. My categories looked like this:

Athletic Wear
S
M
L
1XL
2XL
etc.

This did ease the duplicate image displaying considerably, however, where multiple colors are available, duplicate images did appear. So, just like I indicated above, I made one color active and created a dropdown box for colors. That enabled me to get down to one image with attributes for the product. However, if a customer selects a color that is not in stock, zencart will continue to process the order.

I am literally out of ideas on what to do...please help.

27 May 2013, 7:20 AM
#7
juhanuha avatar

juhanuha

New Zenner

Join Date:
May 2013
Posts:
6
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

kobra:

You are asking in "Setting Up Categories, Products, Attributes" which is for default code questions and you are using the 3rd party addon "stock by attributes"
Look at the support thread for it where your issue may have already been answered which is here
http://www.zen-cart.com/showthread.php?47180-Stock-by-Attribute-v4-0-addon-for-v1-3-5-1-3-9
Yes, I'm looking for a solution for my problem, which is how to get 2 attributes set and with other one's stock quantitity.

I dont care which addon will get it happen or will it happen by default code.

But, hey, thanks for the help :)

27 May 2013, 6:59 PM
#8
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

This is not a slam on the developers of Zencart...I think that the people who started and developed this are really extraordinary and appreciate all of the contributions given by everyone over the years.

After much study and reading, I'm convinced that Zencart if fundamentally flawed. The designers assumed that there would be a picture for each product, quantities for the different attributes would be the same, and prices for different sizes would be the same. In the real world, that does not happen. I'm going to have to use excel macros to break the products down by size and color in order to solve the problem. The categories will look like this:

Performance Wear
-Athletic Wear
--Shirts
---Size
----Color
---Size
----Color
---Size
----Color
Ect.

It's going to be a coding nightmare but at least customers will not have to browse through several identical pictures, hundreds of products will not have to be deactivated, I will not have to mess with the attributes functions of Zencart, and I'll not have to worry that a customer will order something that is not in stock.

If I'm wrong...someone, please give me a simpler solution than writing a macro in excel to deal with this issue.

27 May 2013, 10:28 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

mikeel100:

I'm convinced that Zencart if fundamentally flawed. The designers assumed that there would be a picture for each product, quantities for the different attributes would be the same, and prices for different sizes would be the same
It is not "flawed" - as there are many ways that attributes can be added and just as many reasons
As an example look HERE - where attributes define additions to a base product
mikeel100:

If I'm wrong...someone, please give me a simpler solution than writing a macro in excel to deal with this issue
Have you experimented with selecting in the products setup screen "Priced by attributes"
Have you installed and configured the 3rd party plugin "stock by attributes"?

Zen-Venom Get Bitten

29 May 2013, 4:39 AM
#10
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Thanks for the quick response!

I have not installed any third party attribute plug-ins.

I have not changed any of my products to priced by attributes because I have not seen or read of a way to link all of the inactive products with the active product with attributes.

Apparently, I need to do some more reading unless you can explain your reply more clearly.

How do I make the active product, that has all attributes set to it, into "the base" product and link each hidden (inactive) product to the base product? Knowing that, I assume that selecting the "price by attributes" in the product setup screen will take care of any of the issues I mentioned above.

Thanks again for your help.

P.S. The example you mentioned above is meaningless without knowing what quantities and pictures are available for each attribute.

29 May 2013, 7:32 AM
#11
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

I have a default Zencart with products installed on my machine, so, just for kicks, I looked at the attribute settings and product is priced by attributes in the product set up page for the example you gave in your last reply.

The product had "priced by attributes" turned off (just as mine were).

The attributes were set up identically to the way I had mine set up...with one exception. There is only one, Matrox G400 32MB, graphics card listed in the categories section of the example you gave.

My data provider would list 4, Matrox G400, graphics cards as separate records:

Premium / 16MB / Different Quantity / Different Price (I would make this active and apply model / memory attributes)
Premium / 32MB / Different Quantity / Different Price (...inactive)
Deluxe / 16MB / Different Quantity / Different Price (...inactive)
Deluxe 32MB / Different Quantity / Different Price (...inactive)

Then, they provide one picture for the Premium, one for the Deluxe, or possibly one picture for both models since they are similar in appearance.

Now, do you understand my problem?

Needless to say, I'm still convinced that there is a database relationship missing in Zencart which does not allow linking of active products with attributes to inactive similar products with different colors and sizes where varying quantities are available.

Without the ability to make this critical link, I will end up with an order management nightmare. If the product is not available, then the shopping cart program needs to stop the order...period.

I'm still open to suggestions (because I have been setting up my online shop for 9 months--8-16 hours a day 6-7 days a week). I've got way too much time and knowledge invested in this cart to quit now.

Looking forward to your reply.

29 May 2013, 4:28 PM
#13
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Okay, maybe "flawed" is a little harsh...how about limited? I still like the software and will continue to use it with some sort of work around...thanks for your help.

29 May 2013, 10:36 PM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

there is a database relationship missing in Zencart which does not allow linking of active products with attributes to inactive similar products with...This is not a relationship that needs to be made; the concept you propose is not the way that attributes do or could work. Attributes (with a stock by attributes extension) handle all of this within one master product. It is true that the infinite possible variety of child/dependent/whatever attributes is barely touched by the present system. Hopefully one day someone will come up with a flexible method of handling them. The fact that this holy grail has not yet appeared is indicative of its difficulty.

30 May 2013, 5:39 AM
#15
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Oh, it could work and someone will find a way some day...won't be me. LOL.

I just finished the Excel Macro to handle my Apparel categorization. It's not the idea way I would like to do it but it will work for now.

Apparel
--Batting Jackets
---Large
----Color 1
----Color 2
Etc.

It is similar to walking into a store. The shopper will see the general product they want, find their size, then find the color they want. Size first since it is pointless to look at colors if the size isn't available.

It will also prevent them from ordering something that is not in stock.

It also displays good if people will pick the size before looking at any pics...not so many identical images to view at one time.

Appreciate your help.

30 May 2013, 5:53 AM
#16
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc

Additional info for those who may want to try my approach.

With the category layout I mentioned above, the shopper will see an click on the general product they want (Batting Jackets) and the Featured Products modules will display the styles available.

Here's the macro for breaking down categories: (It is very rough coding...haven't had a chance to clean an make it more efficient but it does work)

Sub RECATEGOIZE()
'temp
Counter = 0
'****************
search_product = ""
search_product_range = ""
product_first_find = ""
search_size = ""
search_size_range = ""
size_first_find = ""
search_color = ""
search_color_range = ""
color_first_find = ""
category = ""
subcategory1 = ""
subcategory2 = ""
' subcategory3 = ""
' subcategory4 = ""
subcategory1_search_range = 2
Do
'DETERMINE TOP LEVEL CATEGORY AND SET VARIABLE
If Counter = 0 Then category = "Apparel"
If Counter = 0 Then subcategory1_search_value = Sheets("MY_CATEGORIES").Range("I" & subcategory1_search_range).Value
'DETERMINE SUBCATEGORY 1 AND SET VARIABLE

If subcategory1_search_value = "apparel/performance_wear/athletic_wear/" Then subcategory1 = "Athletic Wear"
If subcategory1_search_value = "apparel/headwear/sunglasses/" Then subcategory1 = "Headwear"
If subcategory1_search_value = "apparel/men/jackets_coats/" Then subcategory1 = "Vests"
If subcategory1_search_value = "apparel/womens_shapeware/" Then subcategory1 = "Women's Shapewear"
If subcategory1_search_value = "apparel/men/mens_shapeware/" Then subcategory1 = "Men's Shapewear"

'FIND THE PRODUCT AND MAKE SURE IT MATCHES SUBCATEGORY1 THEN SET SUBCATEGORY 2 VALUE
Sheets("DATAFEED").Select
Range("E:E").Select

'SET PRODUCT VARIABLE
search_product_range = 2
Do
search_product = Sheets("MY_CATEGORIES").Range("AB" & search_product_range).Value
Selection.Find(What:=search_product, After:=ActiveCell, LookIn:=xlValues _
, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
If ActiveCell.Offset(0, 7).Value = subcategory1_search_value Then product_first_find = ActiveCell.Offset(0, -4).Value

    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value Then subcategory2 = search_product
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value = "" Then subcategory2 = search_product
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value <> "" Then subcategory2 = Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value

'LENS THICKNESS
' subcategory5 = ""
' If InStr(ActiveCell, "52mm") > 0 Then subcategory5 = "52MM"
' If InStr(ActiveCell, "57mm") > 0 Then subcategory5 = "57MM"

'SIZE SEARCH
subcategory3 = ""
'XSMALL
If InStr(ActiveCell, "X-Small") > 0 Then subcategory3 = "Extra Small"
'SMALL
If InStr(ActiveCell, "Small") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Size S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Black-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "########-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "White-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Purple-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Turquoise-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Cocoa-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Green-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Cherry-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Fuchsia-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Beige-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Unique Colors-S") > 0 Then subcategory3 = "Small"
'SMALL-MEDIUM
If InStr(ActiveCell, "S/M") > 0 Then subcategory3 = "Small-Medium"
'MEDIUM
If InStr(ActiveCell, "Medium") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Size M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Black-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "########-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "White-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Purple-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Turquoise-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Cocoa-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Green-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Cherry-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Fuchsia-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Beige-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Unique Colors-M") > 0 Then subcategory3 = "Medium"
'LARGE
If InStr(ActiveCell, "Large") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Black-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "########-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "White-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Purple-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Turquoise-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Cocoa-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Green-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Cherry-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Fuchsia-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Beige-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Unique Colors-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Size L") > 0 Then subcategory3 = "Large"
'L-XL
If InStr(ActiveCell, "L/XL") > 0 Then subcategory3 = "Large-1X Large"

'1XL
If InStr(ActiveCell, "XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Black-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "X-Large") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "########-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "White-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Purple-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Turquoise-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Cocoa-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Green-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Cherry-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Fuchsia-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Beige-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Unique Colors-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "1XL") > 0 Then subcategory3 = "1X Large"
'2XL
If InStr(ActiveCell, "XX") > 0 Then subcategory3 = "2X Large"
If InStr(ActiveCell, "2XL") > 0 Then subcategory3 = "2X Large"
'3XL
If InStr(ActiveCell, "XXX") > 0 Then subcategory3 = "3X Large"
If InStr(ActiveCell, "3XL") > 0 Then subcategory3 = "3X Large"
'4XL
If InStr(ActiveCell, "XXXX") > 0 Then subcategory3 = "4X Large"
If InStr(ActiveCell, "4XL") > 0 Then subcategory3 = "4X Large"
'5XL
If InStr(ActiveCell, "XXXXX") > 0 Then subcategory3 = "5X Large"
If InStr(ActiveCell, "5XL") > 0 Then subcategory3 = "5X Large"
'6XL
If InStr(ActiveCell, "XXXXXX") > 0 Then subcategory3 = "6X Large"
If InStr(ActiveCell, "6XL") > 0 Then subcategory3 = "6X Large"

'YOUTH SIZES
If InStr(ActiveCell, "YS") > 0 Then subcategory3 = "Youth Small"
If InStr(ActiveCell, "YM") > 0 Then subcategory3 = "Youth Medium"
If InStr(ActiveCell, "YL") > 0 Then subcategory3 = "Youth Large"
If InStr(ActiveCell, "Youth Small") > 0 Then subcategory3 = "Youth Small"
If InStr(ActiveCell, "Youth Medium") > 0 Then subcategory3 = "Youth Medium"
If InStr(ActiveCell, "Youth Large") > 0 Then subcategory3 = "Youth Large"
'WOMENS SIZES
If InStr(ActiveCell, "-32") > 0 Then subcategory3 = "Size 32"
If InStr(ActiveCell, "-34") > 0 Then subcategory3 = "Size 34"
If InStr(ActiveCell, "-36") > 0 Then subcategory3 = "Size 36"
If InStr(ActiveCell, "-38") > 0 Then subcategory3 = "Size 38"
If InStr(ActiveCell, "-40") > 0 Then subcategory3 = "Size 40"
If InStr(ActiveCell, "-42") > 0 Then subcategory3 = "Size 42"
If InStr(ActiveCell, "-44") > 0 Then subcategory3 = "Size 44"
If InStr(ActiveCell, "-46") > 0 Then subcategory3 = "Size 46"
'COLOR SEARCH
subcategory4 = ""
If InStr(ActiveCell, "Beige") > 0 Then subcategory4 = "Beige"
If InStr(ActiveCell, "Black") > 0 Then subcategory4 = "Black"
If InStr(ActiveCell, "Blue Bird") > 0 Then subcategory4 = "Blue Bird"
If InStr(ActiveCell, "Brown") > 0 Then subcategory4 = "Brown"
If InStr(ActiveCell, "Camo") > 0 Then subcategory4 = "Camo"
If InStr(ActiveCell, "Cherry") > 0 Then subcategory4 = "Cherry"
If InStr(ActiveCell, "Cocoa") > 0 Then subcategory4 = "Cocoa"
If InStr(ActiveCell, "Fuchsia") > 0 Then subcategory4 = "Fuchsia"
If InStr(ActiveCell, "Gray") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Est. In 1997 Tee-Shirt") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Grey") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Green") > 0 Then subcategory4 = "Green"
If InStr(ActiveCell, "Heather") > 0 Then subcategory4 = "Heather"
If InStr(ActiveCell, "Khaki") > 0 Then subcategory4 = "Khaki"
If InStr(ActiveCell, "Maroon") > 0 Then subcategory4 = "Maroon"
If InStr(ActiveCell, "Navy") > 0 Then subcategory4 = "Navy Blue"
If InStr(ActiveCell, "########") > 0 Then subcategory4 = "########"
If InStr(ActiveCell, "Olive Drab") > 0 Then subcategory4 = "Olive Drab"
If InStr(ActiveCell, "Purple") > 0 Then subcategory4 = "Purple"
If InStr(ActiveCell, " Red ") > 0 Then subcategory4 = "Red"
If InStr(ActiveCell, "Royal") > 0 Then subcategory4 = "Royal Blue"
If InStr(ActiveCell, "Turquoise") > 0 Then subcategory4 = "Turquoise"
If InStr(ActiveCell, "Unique Colors") > 0 Then subcategory4 = "Unique Colors"
If InStr(ActiveCell, "White") > 0 Then subcategory4 = "White"

    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value Then ActiveCell.Offset(0, 24).Value = category & subcategory1 & subcategory2 & subcategory3 & subcategory4
    If product_first_find <> "" Then
    Do
        search_product = Sheets("MY_CATEGORIES").Range("AB" & search_product_range).Value
        Selection.Find(What:=search_product, After:=ActiveCell, LookIn:=xlValues _
            , LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate

'LENS THICKNESS
' subcategory5 = ""
' If InStr(ActiveCell, "52MM") > 0 Then subcategory5 = "52MM"
' If InStr(ActiveCell, "57MM") > 0 Then subcategory5 = "57MM"

'SIZE SEARCH
subcategory3 = ""
'XSMALL
If InStr(ActiveCell, "X-Small") > 0 Then subcategory3 = "Extra Small"
'SMALL
If InStr(ActiveCell, "Small") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Size S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Black-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "########-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "White-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Purple-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Turquoise-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Cocoa-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Green-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Cherry-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Fuchsia-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Beige-S") > 0 Then subcategory3 = "Small"
If InStr(ActiveCell, "Unique Colors-S") > 0 Then subcategory3 = "Small"
'SMALL-MEDIUM
If InStr(ActiveCell, "S/M") > 0 Then subcategory3 = "Small-Medium"
'MEDIUM
If InStr(ActiveCell, "Medium") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Size M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Black-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "########-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "White-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Purple-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Turquoise-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Cocoa-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Green-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Cherry-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Fuchsia-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Beige-M") > 0 Then subcategory3 = "Medium"
If InStr(ActiveCell, "Unique Colors-M") > 0 Then subcategory3 = "Medium"
'LARGE
If InStr(ActiveCell, "Large") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Black-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "########-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "White-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Purple-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Turquoise-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Cocoa-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Green-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Cherry-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Fuchsia-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Beige-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Unique Colors-L") > 0 Then subcategory3 = "Large"
If InStr(ActiveCell, "Size L") > 0 Then subcategory3 = "Large"
'L-XL
If InStr(ActiveCell, "L/XL") > 0 Then subcategory3 = "Large-1X Large"

'1XL
If InStr(ActiveCell, "XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Black-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "X-Large") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "########-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "White-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Purple-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Turquoise-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Cocoa-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Green-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Cherry-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Fuchsia-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Beige-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "Unique Colors-XL") > 0 Then subcategory3 = "1X Large"
If InStr(ActiveCell, "1XL") > 0 Then subcategory3 = "1X Large"
'2XL
If InStr(ActiveCell, "XX") > 0 Then subcategory3 = "2X Large"
If InStr(ActiveCell, "2XL") > 0 Then subcategory3 = "2X Large"
'3XL
If InStr(ActiveCell, "XXX") > 0 Then subcategory3 = "3X Large"
If InStr(ActiveCell, "3XL") > 0 Then subcategory3 = "3X Large"
'4XL
If InStr(ActiveCell, "XXXX") > 0 Then subcategory3 = "4X Large"
If InStr(ActiveCell, "4XL") > 0 Then subcategory3 = "4X Large"
'5XL
If InStr(ActiveCell, "XXXXX") > 0 Then subcategory3 = "5X Large"
If InStr(ActiveCell, "5XL") > 0 Then subcategory3 = "5X Large"
'6XL
If InStr(ActiveCell, "XXXXXX") > 0 Then subcategory3 = "6X Large"
If InStr(ActiveCell, "6XL") > 0 Then subcategory3 = "6X Large"

'YOUTH SIZES
If InStr(ActiveCell, "YS") > 0 Then subcategory3 = "Youth Small"
If InStr(ActiveCell, "YM") > 0 Then subcategory3 = "Youth Medium"
If InStr(ActiveCell, "YL") > 0 Then subcategory3 = "Youth Large"
If InStr(ActiveCell, "Youth Small") > 0 Then subcategory3 = "Youth Small"
If InStr(ActiveCell, "Youth Medium") > 0 Then subcategory3 = "Youth Medium"
If InStr(ActiveCell, "Youth Large") > 0 Then subcategory3 = "Youth Large"
'WOMENS SIZES
If InStr(ActiveCell, "-32") > 0 Then subcategory3 = "Size 32"
If InStr(ActiveCell, "-34") > 0 Then subcategory3 = "Size 34"
If InStr(ActiveCell, "-36") > 0 Then subcategory3 = "Size 36"
If InStr(ActiveCell, "-38") > 0 Then subcategory3 = "Size 38"
If InStr(ActiveCell, "-40") > 0 Then subcategory3 = "Size 40"
If InStr(ActiveCell, "-42") > 0 Then subcategory3 = "Size 42"
If InStr(ActiveCell, "-44") > 0 Then subcategory3 = "Size 44"
If InStr(ActiveCell, "-46") > 0 Then subcategory3 = "Size 46"
'COLOR SEARCH
subcategory4 = ""
If InStr(ActiveCell, "Beige") > 0 Then subcategory4 = "Beige"
If InStr(ActiveCell, "Black") > 0 Then subcategory4 = "Black"
If InStr(ActiveCell, "Blue Bird") > 0 Then subcategory4 = "Blue Bird"
If InStr(ActiveCell, "Brown") > 0 Then subcategory4 = "Brown"
If InStr(ActiveCell, "Camo") > 0 Then subcategory4 = "Camo"
If InStr(ActiveCell, "Cherry") > 0 Then subcategory4 = "Cherry"
If InStr(ActiveCell, "Cocoa") > 0 Then subcategory4 = "Cocoa"
If InStr(ActiveCell, "Fuchsia") > 0 Then subcategory4 = "Fuchsia"
If InStr(ActiveCell, "Est. In 1997 Tee-Shirt") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Gray") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Grey") > 0 Then subcategory4 = "Gray"
If InStr(ActiveCell, "Green") > 0 Then subcategory4 = "Green"
If InStr(ActiveCell, "Heather") > 0 Then subcategory4 = "Heather"
If InStr(ActiveCell, "Khaki") > 0 Then subcategory4 = "Khaki"
If InStr(ActiveCell, "Maroon") > 0 Then subcategory4 = "Maroon"
If InStr(ActiveCell, "Navy") > 0 Then subcategory4 = "Navy Blue"
If InStr(ActiveCell, "########") > 0 Then subcategory4 = "########"
If InStr(ActiveCell, "Olive Drab") > 0 Then subcategory4 = "Olive Drab"
If InStr(ActiveCell, "Purple") > 0 Then subcategory4 = "Purple"
If InStr(ActiveCell, " Red ") > 0 Then subcategory4 = "Red"
If InStr(ActiveCell, "Royal") > 0 Then subcategory4 = "Royal Blue"
If InStr(ActiveCell, "Turquoise") > 0 Then subcategory4 = "Turquoise"
If InStr(ActiveCell, "Unique Colors") > 0 Then subcategory4 = "Unique Colors"
If InStr(ActiveCell, "White") > 0 Then subcategory4 = "White"

    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value Then ActiveCell.Offset(0, 24).Value = category & "^" & subcategory1 & "^" & subcategory2 & "^" & subcategory3 & "^" & subcategory4
    
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And subcategory3 = "" Then ActiveCell.Offset(0, 24).Value = category & "^" & subcategory1 & "^" & subcategory2 & "^" & subcategory4
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And subcategory4 = "" Then ActiveCell.Offset(0, 24).Value = category & "^" & subcategory1 & "^" & subcategory2 & "^" & subcategory3
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And subcategory1 = "Headwear" Then ActiveCell.Offset(0, 24).Value = category & "^" & subcategory1 & "^" & subcategory2 ' & "^" & subcategory5
    
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value Then subcategory2 = search_product
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value = "" Then subcategory2 = search_product
    If ActiveCell.Offset(0, 7).Value = subcategory1_search_value And Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value <> "" Then subcategory2 = Sheets("MY_CATEGORIES").Range("AC" & search_product_range).Value
    
    Loop Until ActiveCell.Offset(0, -4).Value = product_first_find
    End If
    search_product_range = search_product_range + 1
    product_first_find = ""
Loop Until search_product = ""
subcategory1_search_range = subcategory1_search_range + 1
subcategory1_search_value = Sheets("MY_CATEGORIES").Range("I" & subcategory1_search_range).Value
subcategory1 = ""

Loop Until subcategory1_search_value = ""
End Sub