A suggestion concerning the interface flexibility

  • Posts: 35
  • Thank you received: 0
11 years 10 months ago #86818

I couldn't find a section of the board to make suggestions on, so I will put it here and you can do with it what you will.

Maybe I am missing it, but I cannot find a way to apply different CSS to different products. Becasue we have products with significanlty different interface needs, we move divs about the page which is easy enough using your interface, however when you move left or right part based on needs you need to style it so that it may or may not be float: left or the percentages may change.

Thought I had a way around it by renaming the Divs and adding to the one CSS the program recognizes, but when I did that other things started to break such as the pictures at the top in "left_part". I assume if we stuck with this long enough we could find a fix but we don't want to go too far down the rabbit hole and rewrite the entire interface.

my suggest would simply to be to allow each product to have its own css the same way that you allow each product to have its own "show_???" php page.

I dont' think it would be difficult to call a css for the product and it would add a huge amount of flexibility....

Thanks for considering.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #86892

Hi,

What could be done is, create a new custom field on the table "product" and for each product set a value, for example: css1.
Then in the show_default view you can call a css file depending on the previous custom field value. If the custom field name is "css" then the value is in the variable "$this->element->css".

In the css file, set your custom parameters, and they will override the default css properties.

The following user(s) said Thank You: PolishedGeek

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
11 years 9 months ago #87002

Good Morning Xavier,

That is pretty much what I had in mind. Just a drop down in the products page below the "Layout on product page" dropdown. I assume you would implement it in the views to keep everything working the same.
My guess is you would also put in the categories as well so that it could be inherited.

This would give great flexibility to move divs around and making sure they still worked because all the user would be doing is moving divs and changing parameters of the div. It would leave the core code alone.

I considered hacking this into the software as it would be very helpful to me, but i realize that it is a bad idea to make hacks which effect the database.

I attached a mock-up to make sure I was being clear.

Thanks for being open to this. If you decide to do this, let me know if I could help with documentation. Happy to help if I can. Because this store will be our lifeline to the business, i plan on having a backup system at all times to test new versions before implementing them.

Have a great day....
Jack

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 9 months ago #87250

Hi,

That's not really needed as far as I can see.
On each product page, the main div englobing all the HTML of the product has a unique id based on the product code (which is unique).
So you can simply prefix your custom CSS with that id and the CSS will only apply to that product.

Something like that:
#hikashop_product_Companion_Canoe_P_page .hikashop_product_name_main{
color: green;
}

would display the product name in green for the product with the code Companion_Canoe_P.

So I don't think that it requires that we change HikaShop for that.

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
11 years 9 months ago #88702

Since this answer we have spent hours trying to figure a way to make this work. We cannot do it at the product level as we would be making style calls for way too many products. It is possible that we may be able to do it at the category level but it would take a lot of pre-planning on how to organize the products.

We installed Virtuemart on a different installation to see how they did it and they in fact do allow you to pick your CSS down to the product level, but there are other things they do which we aren't crazy about, so would rather not use them.

We spent a lot of time trying to call a style sheet from a custom view, but we couldn't make it work as it appears that the product page is a multi-part PHP and the styles call is being made directly from the database.

Any suggestions on how we can make this work. Displaying everything the same will definitely not work for us and when we try renaming DIVs, and moving them around in the style sheet it breaks some of your functions (such as the picture display).

Any suggestions here which are workable?????

Getting kind of desperate.

Jack

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 0
11 years 9 months ago #88704

We did do some inline CSS to the custom PHP page and it appears that this may be a work around as all we want to do is move divs around and change their size based on what is required. Will this be affected by upgrades?

I would assume your upgrades would leave the custom Show_$$$ pages alone but i want to make sure before we go through all of this.

JKB

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #88808

The updates will leave the custom pages alone and the css editions.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum