how to wire a light fixture to a plug?
I'm guessing that you are repairing or replacing the light fixtures plug? And if so you would like to know how the wires are connected? The lamp cord as you noticed, has a hot side (which is marked with 'ribs' on the plastic insulation. The other smooth side is the neutral. The repair plug you have is a 2 prong (male) type plug? Which means there is no ground for the fixture. The white wires at the fixture are twisted together and so are the 3 black wires. In order to connect the plug you must connect a white length of wire (and the same for the black) to the wires at the fixture. Twist them tight and secure with a wire nut. You should now have two wires connected to the fixture. ******Please read****:  This answer is assuming a lot from your question. If my second guessing is correct please say so in the comments section below and I will continue responding with an answer.*******