Line Breaks Before Contact Button

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #217876

-- HikaShop version -- : 2.6.0

I have enabled the "Display a contact button on the product page" option, and am getting two phantom line breaks before it in the code.

Please tell me where I should be looking to track down the source of these line breaks. On lines 4 and 5 in the code snippet below.

<div id="hikashop_product_right_part" class="hikashop_product_right_part ">
	<div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"></div>
	<span id="hikashop_product_price_main" class="hikashop_product_price_main"></span>
	<br>
	<br>
	<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"></div>
	<div id="hikashop_product_contact_main" class="hikashop_product_contact_main">
		<input class=" button hikashop_cart_input_button" name="contact_us" value="Contact us about this part" onclick="var field=document.getElementById('hikashop_product_quantity_field_1');window.location='/parts/product/contact/cid-1';return false;" type="submit">
	</div>
	<div id="hikashop_product_tags_main" class="hikashop_product_tags"></div>
	<span id="hikashop_product_id_main" class="hikashop_product_id_main">
		<input name="product_id" value="1" type="hidden">
	</span>
</div>


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 10 months ago by NigelPeck.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #217934

Hi,

These line breaks are present in the view "product / show_tabular", here is the tutorial explaining how to edit a view:
www.hikashop.com/support/support/documen...ize-the-display.html

The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #217944

Thanks, that's great.

So will I need to make the changes each time HikaShop is updated? The page doesn't explain what happens when I change a view. The product/show_tabular view clearly shows the HikaShop version number at the top, so won't I be missing out on future updates if I customise this file and it then overrides the future default versions? Please give me some more info on that, as I'm looking to use HikaShop for future sites and am confused about the implications of these types of customisations.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 10 months ago by NigelPeck.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #217949

Hi,

No, via the view overrides you can update without loosing your modifications.
www.hikashop.com/support/support/documen...-display.html#layout

Last edit: 9 years 10 months ago by nicolas.

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #218030

Thanks, I understand that.

But I am also concerned that I would miss any updates that are made to the file I am overriding. Let's say the next update contains a new version of the view file "product/show_tabular" that has updated code for something. Surely I will miss out on that because I'm overriding it with a file from a previous version. So yes, it has my changes, but the rest of the code in the file is now missing out on updates.

So really, to stay properly up to date with new versions of HikaShop for all of the code, it seems to me I really need to track changes I make and do them again each time. Which renders the whole override system pointless in a sense.

Another point of interest is that of course this is if the changes are needed in a future version; my line breaks above could be removed in a future updated version of HikaShop and render my change unnecessary! But my override would still be in place keeping "product/show_tabular" locked on an old version.

So in the end, if I want to have the system in top condition, the overrides seem a little pointless to me, since it means I am now taking that part of HikaShop (that view file) out of the update cycle, which is as important for one file as it is for all of the files.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 10 months ago by NigelPeck.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 10 months ago #218046

Hi,

The views are not often updated, so it is not a big deal. More than that when we are updating codes, etc we keep a retro compatibility, so there will not be issues with older views.

Once you have edited a view, if everything is working fine for your website, if it is doing all that is expected, why change it ?

If you really want to keep your views up to date, you can follow our change log there:
www.hikashop.com/support/support/documen...ashop-changelog.html
And if something related on the views is changes so you can update them and put back your modifications.

Regarding the override system, I don't think we can do something more efficient than that, it is the same system used by Joomla and the templates.

The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #218123

Thanks, that's very helpful. The change log is a useful idea. I didn't really highlight before that I am only really concerned about this for sites that I am looking to keep in absolute top condition. I am not complaining about the system, it's a fine idea and works well. I just want to know how to be on top of this properly, rather than waiting until a display issue arrives and then finding a view override needs bringing up to date.

A reason for changing a view could be any reason that a default view is changed within HikaShop. Perhaps to keep up to date with changing standards.

So does HikaShop create a view override automatically the first time a change is made to a view?


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/
Last edit: 9 years 10 months ago by NigelPeck.

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
9 years 10 months ago #218140

Yes, exactly. Once you save a view file, an override is created automatically for that view file.
You can then delete it on the listing of view files if you want to revert to the original latest version of the view file.

The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #218183

Thanks. Where are the view overrides stored once they're created? Are they within the HikaShop file structure?

One small niggle, it would be nice if the views table allowed itself to be sorted by columns. There doesn't seem to be an easy way to bring all of the overridden files to the top of the table, which makes it very difficult to review all of the overrides in place.

And finally, how can I change the topic title for this topic? Changing the subject of the first post didn't do it. I just wanted to add " + View Overrides" to include the discussion on that.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 10 months ago #218204

Hi,

The view overrides use the Joomla override system ; we just propose an interface for the management of the views.
Content is stored in the override folder in the template.

We will see to improve the view override listing page ; maybe with a new filter, but regarding the structure, a sorting won't be useful.

Finally, you can't edit the thread subject, only a moderator can.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #218330

Thanks for the info. Yes sure a filter sounds good.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/

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

  • Posts: 2143
  • Thank you received: 747
9 years 10 months ago #218364

NigelPeck wrote: But I am also concerned that I would miss any updates that are made to the file I am overriding.


This had been my concern a while ago as well. Since then the good guys at HikaShop are also publishing the list of changed files with an update - see the link on top of the changelog . So, you can compare this list with your overrides, and if needed, use a file comparison tool to see what the exact changes were from the previous version to the newest.

In addition to reading the changelog (mandatory!), this list is a great tool to verify actuality of your overrides, obviously.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: NigelPeck

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

  • Posts: 56
  • Thank you received: 1
9 years 10 months ago #218372

That's great, thanks. Sounds a good approach.


Professional website services including website management, Linux server admin and web hosting.
www.sharphosting.uk/

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

Time to create page: 0.094 seconds
Powered by Kunena Forum