Court,
The short answer is that you convert DC to AC with an inverter. Hooking an inverter to the output of some solar panels would give you 120 V AC. Then you could plug your standard charger into the inverter. This is problematic because the sun is going to go behind a cloud at some point, the output of DC current will drop, and the inverter will probably shut down. It's not a good system because the inverter is really looking for DC output from a battery, which is relatively stable. This system will cycle too much, straining all the components, without a battery buffer.
So the next layer to add is a 12v battery. Now the panels go to the battery and the inverter goes to the battery, and it is more stable. Inverters are sold into the auto and RV markets, where 12V batteries are standard. The question is how much of a battery is needed, and since a lead acid battery works quite well for solar charging, assume some weight to add this battery. A good AGM battery with maybe a 30 AH rating will take the charge as the inverter draws it off. Adding this storage battery has a big advantage. If there is no sun, there is still a charging battery left to charge the Ebike battery. The cost is maybe $120 and 20 pounds of weight.
The idea of sending solar power to a charge controller and then into an inverter, and back into another battery is not efficient. We are converting DC to AC so we can convert it back into DC. But, this lets you use the regular charger. Any solar panel that is hooked to a battery is a stable source of DC. With the DC and an inverter you have 120V AC. The question now is one of sine wave versus modified sine wave, and that is a cost issue. In general, power supplies will work with the cheaper inverters. You might ask the ebike manufacturer about this. It should have come up.
A more direct way would be to have a second Ebike battery and simply charge it from the solar system. You basically have to figure out where the circuits are that protect the cells. If the battery is designed to be charged off the bike, it is a pretty good bet that all the charger unit is doing is supplying a specific DC voltage. That is easy. DC-DC converters are cheap and precise. The battery should be very happy, as happy as it would be with the regular charger. If the battery charges on the bike, or is not accessible, this is not going to work.
The output on my PT X3 is specified on the charging unit at 43V. You would expect the output voltage for charging to be maybe 20% above the rated voltage of the battery, often 24v, 36v, or 48v. As long as you match that voltage, nothing has changed. But there are sophisticated electronics that go with any lithium battery. I assume the battery charger is just a power supply, but there may be other functions on board. They seem to put the circuitry in the battery case, but who knows.
If you can charge a second (bike) battery, off the bike, by supplying the current specified by the charger (or by measuring it) all you need is the battery connector. You need an upconverting DC-DC variable power supply, which the Chinese seem happy to supply on Ebay for very little money. You still might want to buffer the output from the solar panel with a small battery, say 10AH. That way the output won't be dropping off. But this second battery requires a charge controller. Every circuit and every battery has a cost. It depends on how robust your system is, how much wattage you get from the solar panels relative to what you need. If you need every watt, you need peak efficiency.
To summarize the second system: The solar panel produces maybe 16 volts and 5 amps with full sun. You can convert this 16 volts to 43 volts with a DC - DC converter. These are relatively simple and efficient. Now the solar panel produces 1.6A at 43 volts, steadily, depending on the sun. If the 43 volts is all you need to regulate, charge, and make the battery happy, you are done. You need the plug that goes into the battery.
Second batteries for ebikes are not cheap. If someone has a serious need for unplugged travel, a system can be designed, swapping two batteries. I think the idea behind these trailers is that there is more capacity, and part of that might have to be used to have more power, better options. Having a decent 12V storage battery might be very useful, along with an inverter. The first system gives you a nice source of AC power for any need. And you just plug the basic ebike charger into the 120 outlet, and the sun refuels the source battery when it can.
I can see where someone who would be utilizing a trailer all the time could just design a bike and integrate the bike power to a battery system that integrated solar. That's not where the buyers of ebikes are going, right now. But solar has just gotten so cheap that the kinds of power that any ebike uses represents a rather tiny investment in solar panels. What you can't do is easily keep the panels in the sun. You basically need a real trailer to carry the panels, because of the size, but if you can carry them, the sun will provide the power, at least while parked. For $400 buy two 100W panels (the heavy kind), a basic charge controller, a 500 W inverter, and a 30 AH AGM battery. You have to figure out how to carry it. The lighter panels add $250.
A lot of this stuff is more complicated because there are more sophisticated options. For example, to charge a 12V battery from a solar panel you can either just clamp the voltage and protect the battery from too much voltage from the panel. Or you can use a MPPT controller that converts the voltage down to a safe charging voltage, conserving the overall watts from the panel. People don't need to know 'too much' but there are a lot of paths to the same goal of solar charging and creating 120VAC from a 12V DC battery.
I'm not real sure about riding the bike and charging the battery on the bike at the same time. You'd have to ask...