[Skip to main content](#vessel-content)

#   Custom text before price

##

- **[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")**
- [![verzevoul's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8351-verzevoul "View verzevoul's Profile") Topic Author
- [ Offline](/forum/user/8351-verzevoul)

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 months 3 weeks ago [\#372306](#372306) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[Custom text before price](/forum/26-product-category-display/910613-custom-text-before-price#372306 "-- HikaShop version -- : 6.5.0 -- Joomla version -- : 6.1.1  Hi!  Before the price i added a custom text &quot;Our price&quot; in the view file. The thing is that i have characteristics in the products and when you select a characteristic from the dropdown, that texts disappears. How can i have it there for all characteristic prices as well?  Thank you")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 6.1.1

Hi!

Before the price i added a custom text "Our price" in the view file.
The thing is that i have characteristics in the products and when you select a characteristic from the dropdown, that texts disappears.
How can i have it there for all characteristic prices as well?

Thank you

- [ ![text.png](/forum/attachment/63245) ](/forum/attachment/63245 "text.png") [ ](/forum/attachment/63245?download=1 "text.png")
- [ ![no text.png](/forum/attachment/63246) ](/forum/attachment/63246 "no text.png") [ ](/forum/attachment/63246?download=1 "no text.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA2MTMtY3VzdG9tLXRleHQtYmVmb3JlLXByaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

4 months 3 weeks ago [\#372310](#372310) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom text before price](/forum/26-product-category-display/910613-custom-text-before-price#372310 "-- HikaShop version -- : 6.5.0 -- Joomla version -- : 6.1.1  Hi!  Before the price i added a custom text &quot;Our price&quot; in the view file. The thing is that i have characteristics in the products and when you select a characteristic from the dropdown, that texts disappears. How can i have it there for all characteristic prices as well?  Thank you")*

Hello,

When you select a characteristic, HikaShop does not just refresh the price value: it replaces the whole content of the price container (the element with the id hikashop_product_price_main) with a hidden block that was pre-rendered for the chosen variant. Your "Our price" text sits inside that container, so it gets overwritten by the variant block.

The base price and every variant price are all rendered by the same price layout, listing_price.php. So that is where your text belongs: add "Our price" at the top of listing_price.php (through a template override). It then becomes part of the main price block and of each variant block, so it stays in place when the content is swapped in.

One thing to keep in mind: listing_price.php is also used for the product listings (category pages), so the text would show there too. If you want it only on the product page, then instead add it just before the price container, outside it, in your product page layout (show_default.php, or the layout matching your product page setting):
Code:

Our price &lt;span id="hikashop_product_price_main" class="hikashop_product_price_main"&gt; ... &lt;/span&gt;

Only the content inside that span is replaced, so anything placed before it is kept when you change the characteristic.

The following user(s) said Thank You: [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA2MTMtY3VzdG9tLXRleHQtYmVmb3JlLXByaWNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
