- Posts: 75
- Thank you received: 1
creat a link from a text word to shipping fee
- Scheinbacher
-
Topic Author
- Offline
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.
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.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
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.
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.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
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.
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.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
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.
Please Log in or Create an account to join the conversation.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
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.
Please Log in or Create an account to join the conversation.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
Please Log in or Create an account to join the conversation.
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.
- Scheinbacher
-
Topic Author
- Offline
- Posts: 75
- Thank you received: 1
Thank you.
Please Log in or Create an account to join the conversation.
my code is:
echo "<span class=\"my_custom_class\" style=\"display:none;\"><a href=\"/index.php/component/content/article?id=4&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&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.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The solution will probably be to use that kind of code :
Please Log in or Create an account to join the conversation.
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.
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.
Please Log in or Create an account to join the conversation.
To have it only on the product page, you can probably use this code:
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.
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.
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" ?
Please Log in or Create an account to join the conversation.