Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Diferent backgroundfor every product

   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
Thread Tools Search this Thread
Old 05-25-2020, 05:46 AM
Sancho Pantches Sancho Pantches is offline

Join Date: Feb 2020
Posts: 4

Default Diferent backgroundfor every product

Is there a way to have different background, and colors, per product?
Like use product ID for the CSS switching?
Kind regards
Reply With Quote
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

The following user thanks Ed B. for this useful post:
Sancho Pantches (08-03-2020)
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -8. The time now is 01:07 PM.


X-Cart forums © 2001-2020