View Single Post
Old 07-06-2020, 11:33 PM
Ed B. Ed B. is offline

Join Date: Apr 2016
Posts: 404

Default Re: Diferent backgroundfor every product

Is it good enough for you if the set of different colors are hard-coded in the module? If yes, it is not too difficult.

If no, I could imagine a couple of possibilities which look either difficult or impossible, but here they are
  • One could put a js to modify the css according to the productId. The problem here is I don't know how to feed the productId into js.
  • One could let the module write css files, let's say, when module parameter gets set up. One of he difficulties is, I don't know if there is a "X-cart" way of writing a file. But after all, a php code is a php code, so this should be possible. But then, the second problem is, is the path to module css files writable by http server?
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote