Version tag in the source files

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2322

Hi,
I'm upgrading my modified v1.3.6 to 1.3.7.

I have modified core files, so I need to merge the changes, I cannot just overwrite everything :(

Version tags("* @version 1.3.7") in php files are causing me some trouble. When I compare two folders, it looks like all files has been modifed whereas 99% of the time it is only 1 line change - the version number. I have to go through all files. Is it possible that @version tag is excluded from php files?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2324

Hi,

We are just following Joomla's best practices on file headers: docs.joomla.org/Extensions_GPL_notices

With HikaShop, you can override all the views via the Display->Views menu. When you do your changes that way, you keep all your modifications after an update. Same for the CSS. If you edit it via the configuration->display interface, you won't loose your changes during an update.

So if you did your changes that way, you shouldn't loose anything when you update. That's the whole point of following joomla MVC structure: docs.joomla.org/Understanding_Output_Overrides

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

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2327

nicolas wrote:

Hi,

We are just following Joomla's best practices on file headers: docs.joomla.org/Extensions_GPL_notices

With HikaShop, you can override all the views via the Display->Views menu. When you do your changes that way, you keep all your modifications after an update. Same for the CSS. If you edit it via the configuration->display interface, you won't loose your changes during an update.

So if you did your changes that way, you shouldn't loose anything when you update. That's the whole point of following joomla MVC structure: docs.joomla.org/Understanding_Output_Overrides


The problem is I did not only change the design but also changed functionality :)

For example there was a problem with long product names. If you change product name to a long word, part of the row in the cart does not fit into module. So I had to fix it in php file.

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

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2328

By the way, now I tried it and I was able to reproduce this also on the demo site(so it's not related to my template), change the name of the rubber duck to "rubberduckrubberduck" and you will see that the cross icon is party invisible in the cart.

Here is the change I made. It replaces "rubberduckrubberduck" with "rubberdu."

Feel free to include the code in your next release if you want:

/com_hikashop/views/product/tmpl/cart.php

(Below I replaced php opening/closing tags otherwise the code is not shown)

								<a href="?php echo hikashop::completeLink('product&task=show&cid='.$row->product_id.$url_itemid);?" >
								?php
									// Fixes the width proplem when the product name is too long
									// ------------
									$words = explode(" ", $row->product_name);
									$count = count($words);
									for($i=0; $i < $count; $i++) {
										if(strlen($words[$i]) < 10) {
											echo $words[$i];
										}
										else {
											echo substr($words[$i], 0, 9) . "."; 
										}
										if($i != ($count -1)) echo " ";
									}
									// ------------
								?</a>

Last edit: 13 years 11 months ago by LAS_VEGAS.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2330

You can go to Display->Views and edit the file cart of the view product. There, you can put your modification which will stay even after you update.

Between CSS and the override of views, You should be able to customize a lot of stuff without touching 1 core file of HikaShop.

The size of the module column greatly depends on your template so this modification might not be suited for everyone. And since you can easily tweak that in view overrides without having to hack HikaShop's code, I don't think that we will include it. But thanks for posting it. I'm sure other users will find that userful !

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

  • Posts: 12
  • Thank you received: 0
13 years 11 months ago #2331

nicolas wrote:

You can go to Display->Views and edit the file cart of the view product. There, you can put your modification which will stay even after you update.

I didn't know that, thanks.

But I didn't quite get how my modifications can stay after I update hikashop. Does it mean that the files I've modified won't be updated with the latest changes you made?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2342

Yes. When you edit your views that way, the modified files aren't updated.

Last edit: 13 years 11 months ago by nicolas.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum