Skip to main content

creat a link from a text word to shipping fee

More
14 years 7 months ago #40038 by Scheinbacher
Hi

I would like to creat a link next to the product price to our shipping fee site.
Maybe you have an idea.
Thank you.


Attachment Bildschirmfoto2012-02-18um14.10.44.png not found

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

More
14 years 7 months ago #40266 by nicolas
Hi,

You could edit the file "listing_price" of the view "product" via the menu Display->Views in order to add your HTML at the end.

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

More
14 years 7 months ago #40372 by Scheinbacher
Thank you Nicolas,

I already add this line:

echo " inkl. 19%MwSt zzgl.";
echo "<a href=\" sexyplexi.de/index.php?option=com_conten...&Itemid=550&lang=de\ ">Versandkosten";

After this, it shows everywhere also in the cart and in the price of the options.

How can I reduce this to only in the product page?

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

More
14 years 7 months ago #40564 by nicolas
Do like that:

echo "<span class="my_custom_class" style="display:none;"> inkl. 19%MwSt zzgl.";
echo "<a href=\"sexyplexi.de/index.php?option=com_conten...ten</a></span>";


and add the CSS:

.hikashop_product_page .my_custom_class{display:inline !important;}

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

More
14 years 6 months ago #42555 by Scheinbacher
Nicolas,

I have added these lines:

echo "<span class="my_custom_class" style="display:none;"> inkl. 19%MwSt zzgl.";
echo "<a href=\"sexyplexi.de/index.php?option=com_conten...ten</a></span>";

at the end of listing_price view product and

this line

.hikashop_product_page .my_custom_class{display:inline !important;}

at the end of CSS in configuration view.

It does not work. Please advice.

Thank you.

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

More
14 years 6 months ago #42693 by nicolas
What does not work ?

Please give more information. Nothing happens ? It doesn't display exactly like you want ?
Did you edit the file for the correct template ?
Did you flush your browser cache ?
Could you give a link to that page so that we can see your modifications ?

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

More
14 years 6 months ago #42856 by Scheinbacher
Nicolas,

these are the last line in "product / listing_price.php":

if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){
$weight_price = $price->price_value / $this->row->product_weight;
echo $this->currencyHelper->format($weight_price,$price->price_currency_id).' / '.JText::_($this->row->product_weight_unit);


}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
echo '</span>';




}
}
*/
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $price->price_min_quantity>1){
echo '</span>';
}
}


echo JText::_('PRICE_END');


}


?> </span>

echo "<span class="my_custom_class" style="display:none;"> inkl. 19%MwSt zzgl.";
echo "<a href=\"plexiglas-deko.de/index.php/de/versand-zahlung-plexiglas-acrylglas</a></span>";


Please the link:
plexiglas-deko.de/index.php/de/?ctrl=pro...sk=show&product_id=7

The Text "inkl. 19%MwSt zzgl.Versandkosten" does not display after the price.
And it seems to me all the following text is now the link and not only "Versandkosten".

Thank you

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

More
14 years 6 months ago #42873 by nicolas
Then it means that you're not editing the correct product/listing_price.php file. Please make sure that you're doing the modifications in the file of the template you're using on your front end.

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

More
14 years 6 months ago #42880 by Scheinbacher
I have do the modification in the file you mentioned (frontend).
Is the code right as I written?
Could you please check this for me?

Thank you.

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

More
14 years 6 months ago - 14 years 6 months ago #42883 by nicolas
I don't see your modification in that file:
Code:
http://plexiglas-deko.de/administrator/index.php?option=com_hikashop&ctrl=view&task=edit&id=0|mx_joofree6|component|com_hikashop|product|listing_price.php
Last edit: 14 years 6 months ago by nicolas.

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

More
14 years 6 months ago #42886 by Scheinbacher
I took it out. But you can put it back and test it.

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

More
14 years 6 months ago #42890 by nicolas
It's working, it's just that your code was not valid (all the " were not escaped), but it's the correct file to do the change.
Here is the finale code:

echo "<span class=\"my_custom_class\" style=\"display:none;\"><a href=\"plexiglas-deko.de/index.php/de/versand-zahlung-plexiglas-acrylglas\"> inkl. 19%MwSt zzgl.</a></span>";

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

More
14 years 6 months ago #42895 by Scheinbacher
You save my day.

Thank you.

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

More
12 years 5 months ago - 12 years 5 months ago #151334 by ff87
Hi guys,

my code is:
echo "<span class=\"my_custom_class\" style=\"display:none;\"><a href=\"/index.php/component/content/article?id=4&amp;tmpl=component\"> zzgl. Versandkosten</a></span>";

But I would like to paste this html code into the echo command:

<html>
zzgl. <a onclick="return window.hikashop.openBox(this,null,false);" href="/index.php/component/content/article?id=4&amp;tmpl=component" rel="{handler: 'iframe', size: {x: 460, y: 270}}">Versandkosten</a>
</html>

How to do it?

In addition, I would like to make a break so "zzgl. Versandkosten" is shown under the price. Moreover, ONLY by clicking "Versandkosten", the box shall be opened.
Last edit: 12 years 5 months ago by ff87.

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

More
12 years 5 months ago #151373 by Mohamed Thelji
Hello,
The solution will probably be to use that kind of code :
Code:
echo "<html>zzgl. <a onclick=\"return window.hikashop.openBox(this,null,false);\" href=\"/index.php/component/content/article?id=4&tmpl=component\" rel=\"{handler: 'iframe', size: {x: 460, y: 270}}\">Versandkosten</a></html>";
The following user(s) said Thank You: ff87

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

More
12 years 5 months ago #151579 by ff87
Oh nooo, so easy? :lol:
I must say I was close but I thought a bit different. Ok, now I understand the principle of PHP concerning including a html code, many thanks! *thumbs up*

Best Regards

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

More
12 years 5 months ago - 12 years 5 months ago #151581 by ff87
Dear Mohamed,

is it actually possible to specifiy the template css to the iframe? The problem is that the print look will be used (print.css) but I would like to let it show with the standard css of the used template.

Looking forward to hear from you again.


EDIT:

By the way: unfortunately, adding this code with the html is finally not the solution as I have the same problem again what Scheinbacher already mentioned:

After this, it shows everywhere also in the cart and in the price of the options.

How can I reduce this to only in the product page?


Pity. But thanks anyway.
Last edit: 12 years 5 months ago by ff87.

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

More
12 years 5 months ago #151701 by Xavier
Hi,

To have it only on the product page, you can probably use this code:
Code:
$ctrl = JRequest::getVar('ctrl',''); $task = JRequest::getVar('task',''); if($ctrl == 'product' && $task == 'show'){ echo "<html>zzgl. <a onclick=\"return window.hikashop.openBox(this,null,false);\" href=\"/index.php/component/content/article?id=4&tmpl=component\" rel=\"{handler: 'iframe', size: {x: 460, y: 270}}\">Versandkosten</a></html>"; }

But having html tags inside another html tags is not a good solution, you should have iframe tags around you html ones I think.
In the echo you can potentially add a code to call the desired stylesheet.

<link rel=stylesheet href=" www.yourdomain.com/style.css " type="text/css">

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

More
12 years 5 months ago #151741 by ff87
Hi Xavier,

concerning print.css I have edited it so the style of the iframe is ok now.
Concerning your code, it works but nevertheless I can see the same link in the cart module so I still haven´t reached what I want to.

I need a code which expresses this:
If the product page is shown, ONLY then show the link under the price BUT don´t show it in the cart module.

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

More
12 years 5 months ago #151767 by Xavier
Hi,

I forgot to ask you something, at which place are you adding that code ?
If you want that only on the product page, Why not add it directly in the view "product / show_default" ?
The following user(s) said Thank You: ff87

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

Time to create page: 0.305 seconds
Powered by Kunena Forum