Tables vs Divs? Why use tables?

  • Posts: 38
  • Thank you received: 0
13 years 2 weeks ago #29851

I noticed a few tables used throughout HikaShop and groaned... Oh, no, how could this be?
That will make customization a real drag!

I guess I will have to hack it? Trying to avoid that if possible. The setting in the configuration don't seem to control (see below) Any over rides available?
I understand putting data in tables, but position those elements with css becomes impossible.


Could you suggest where to look, I will need to change tables to divs for:

1. minicart (this one really needs to be customizable, the whole thing is formatted with tables, that won't do!)
2. product characteristics radio button (the table isn't even doing anything in this case, just holding the input fields, changing that should be easy. I assume it is in place for more complex product characteristic?)


Any suggestions? Did I miss something? :unsure:

Thanks

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 2 weeks ago #29853

Hi,

Why use tables ? :)
We try to use divs but we use tables when needed.

1. The mini cart does not use any tables as it's just one line of text. You must be talking about the cart module in normal mode. It's a listing of products, so it uses a table, like with any listings in HikaShop.
You can change that by editing the file "cart" of the view "product" via the menu Display->Views. That won't be a "hack" but an override of the view which won't be a problem when your update.

2. Indeed, you can have more than just a characteristic. You can have 4/5 of them. Having them in a table makes sense.
That's a bit more tricky to edit. You need to create a characteristic display override:
www.hikashop.com/en/support/documentatio...tation.html#override

You should already be able to do a lot of stuff with just CSS even with tables.
On our demo website, the only place where we changed a view is on the personalized view product (it's to show what you can do when you personalize a view, so that was on purpose). All the rest was done with just CSS.

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

  • Posts: 38
  • Thank you received: 0
13 years 2 weeks ago #29861

Thanks, that helps!

I missed the HikaShop options (again) for the cart, I see the mini cart now. Nice.


Now, the simplest option for characteristics would be a drop down menu, but I wanted to implement something like the following



It's nice to give all the options at once. That would be pretty simple with a list. I'm also hoping to implement some way of having a per item default color, to match the main product image.

Any ideas for that one?

Attachments:

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 2 weeks ago #29865

In the Display tab of the config, you can select the "Characteristics selection method" for that.
The default value can be selected on the product page after you add your characteristic.

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

  • Posts: 38
  • Thank you received: 0
13 years 2 weeks ago #29866

Thanks!

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

Time to create page: 0.061 seconds
Powered by Kunena Forum