Changes in show_default.php don´t saves

  • Posts: 56
  • Thank you received: 0
12 years 6 months ago #48140

Hi,

If I makes same changes in show_default.php about witch order I want the characterist and price for the product to be in and click "Save" and Joomla tells my, "Saves succed" but in the frontend it´s still not done any changes!
How can that be?

For an example:
If I have add some text in show_default.php, beside a div-element, and then erase the text and saves it again It´s still on the webbpage in frontend.
It doesn´t makes any different if I changes the file within the ftp-software or in the backend Product -> Show -> show_default.php

Just be sure, the show_default.php are the product-page for a Hikashop-product?

Edit: Adding som code!

View source webbpage frontend:

<!-- ### Dropdownmeny pris START### -->
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
		<span class="hikashop_product_price_full">
<span class="hikashop_product_price hikashop_product_price_0">715,00 SEK</span>  per enhet</span>	</span><br />
<!-- ### Dropdownmeny pris SLUT ### -->	

<br />
	<span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main">
</span>
Antal: 
<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
						<h5>Antal:</h5>
And its the text "Antal:" under the </span>-tag I want to remove and instead add the h5-element with the quantity-file.
<!-- ### Dropdownmeny varianter START ##################################### -->
	<?php
	$this->setLayout('show_block_charasteristic');
	echo $this->loadTemplate();
	?>
	<!-- ### Dropdownmeny varianter SLUT ### -->

		

	<br />
	<?php
	$form = '';
	if (!$this->config->get('ajax_add_to_cart', 1)) {
		$form = ',\'hikashop_product_form\'';
	}
	if (hikashop_level(1) && !empty ($this->element->options)) {
	?>
		<div id="hikashop_product_options" class="hikashop_product_options">
			<?php
			$this->setLayout('option');
			echo $this->loadTemplate();
			?>
		</div>
		<br />
		<?php
		$form = ',\'hikashop_product_form\'';
		if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
		?>
			<input type="hidden" name="popup" value="1"/>
		<?php
		}
	}
	if (!$this->params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || !empty ($this->element->prices))) {
		if (!empty ($this->itemFields)) {
			$form = ',\'hikashop_product_form\'';
			if ($this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
			?>
				<input type="hidden" name="popup" value="1"/>
			<?php
			}
			$this->setLayout('show_block_custom_item');
			echo $this->loadTemplate();
		}
	}
	$this->formName = $form;
	?>
	<span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main">
	</span> 
	<div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main">
		<?php
		$this->row = & $this->element;
		$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . '); } else { return false; }';
		$this->setLayout('quantity');
		echo $this->loadTemplate();
		?>
	</div>

	
	<!-- ### Dropdownmeny pris START### -->
	<span id="hikashop_product_price_main" class="hikashop_product_price_main">
		<?php
		if ($this->params->get('show_price')) {
			$this->row = & $this->element;
			$this->setLayout('listing_price');
			echo $this->loadTemplate();
		}
		$this->setLayout('show_block_dimensions');
		echo $this->loadTemplate();
		?>
	</span><br />
	<!-- ### Dropdownmeny pris SLUT ### -->

And in quantity.php I create the h5-element above the quantity-field.
/Micke

Last edit: 12 years 6 months ago by Micke_skane.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #48183

Unless you changed the product page layout option somewhere that's indeed that file. But make sure that you're editing it for the correct frontend template.
Also, sometimes, the codemirror editor can cause such problems. Try to deactivate its plugin in the joomla plugins manager.

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

  • Posts: 56
  • Thank you received: 0
12 years 6 months ago #48236

Also, sometimes, the codemirror editor can cause such problems. Try to deactivate its plugin in the joomla plugins manager.

That´s solved the problem! This little problem/solution wasn´t in the documention :)
Thanks!

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

  • Posts: 14
  • Thank you received: 2
12 years 6 months ago #48942

First, I need to mention I'm using Joomla! version 2.5.x.

I have tried the options mentioned above. The changes I submit are saved and disabling/enabling codemirror seems to have no effect. (I wasn't using an editor anyway.)

When viewing the frontend, the changes to show_default.php are not reflected for the template I'm using. I edited show_default.php for ALL templates just to see if any of them would work. I changed the template defaults for each. There is no effect for any template, not even the default ones that are included with Joomla!.

Ultimately, I don't want the product code to show up on the same bolded heading as the product name. Again, the changes are saved when I return to editing show_default.php but the frontend shows no changes.

Any ideas?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #48992

If you did the changes and that you still see them when you edit the file, and that you edited the file for all the templates, the only thing left I can see is that the changes are not what they should be. What changes did you do in the file ?

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

  • Posts: 14
  • Thank you received: 2
12 years 6 months ago #48995

Thanks for the prompt response.

Just to test things out, I tried to insert a break between the product name and the product code using <br />. I also added a style attribute to the product code with color gold.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 6 months ago #48998

If you're using a rockettheme template, the span processing of the template removes all the attributes of the tags in the h1 tag.
You should turn off the span processing in that case.

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

  • Posts: 14
  • Thank you received: 2
12 years 6 months ago #49013

Fantastic! It is in fact a RocketTheme! Let me try it!

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

  • Posts: 14
  • Thank you received: 2
12 years 5 months ago #53479

nicolas wrote: If you're using a rockettheme template, the span processing of the template removes all the attributes of the tags in the h1 tag. You should turn off the span processing in that case.


How do I turn off span processing? Will this affect other parts of the site?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #53547

There is a span processing option in your template's options for that.
It might affect the style of the title of the pages if you were using the span processing.

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

  • Posts: 14
  • Thank you received: 2
12 years 5 months ago #53677

Is there a way to manipulate a file in Hikashop I can manipulate so that I don't tamper with the rest of the template? (i.e. adding !important to a CSS file or modifying a php file)

Thank you for your help thus far.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #53683

Well, you already know. It's the file "show_default" of the view "product" that should be modified.

Did you edit the file "show" of a previous release and then updated ? That would explain why your modifications to show_default don't change anything. And in that case, you should do the same modifications in the "show" file of the view "product"

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

  • Posts: 14
  • Thank you received: 2
12 years 5 months ago #53690

No, this is a fresh new install and using HikaShop version 1.5.7.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #53702

I already gave you all the possible answers:
turn off the option in your template
change the file (if the file change doesn't work even with codemirror turned off, it's either that you're not editing the correct file for the correct template or that your access rights to the folder templates/YOUR_TEMPLATE/html/com_hikashop don't allow joomla to write the override file).
There is no other solution.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum