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

#   Sound Player on Variants Pages Fails to Load

##

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 1 week ago [\#281672](#281672) by [bshomer](/forum/user/42675-bshomer "View bshomer's Profile")  *[Sound Player on Variants Pages Fails to Load](/forum/26-product-category-display/892601-sound-player-on-variants-pages-fails-to-load#281672 "-- url of the page with the problem -- :   beautiful-spirit.com/index.php/he/tibet-tester  -- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.30 -- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86&#95;64; rv:56.0) Gecko/20100101 Firefox/56.0  Hi,  I have several sizes of a product (Tibetan singing bowl). Each produces a different sound. On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file. Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page. As soon as I switch to a variant using the drop-down list box, the player stops working.  It is clear to me that it has something to do with dynamic loading or code or something similar. I really must have it as variants and not as separate product page for each diameter of the bowl.  Any suggestions, please?  Thanks in advance.")* was created by *[bshomer](/forum/user/42675-bshomer "View bshomer's Profile")*

-- url of the page with the problem -- : [ beautiful-spirit.com/index.php/he/tibet-tester](https://beautiful-spirit.com/index.php/he/tibet-tester)
-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.30
-- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

Hi,

I have several sizes of a product (Tibetan singing bowl). Each produces a different sound.
On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file.
Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page.
As soon as I switch to a variant using the drop-down list box, the player stops working.

It is clear to me that it has something to do with dynamic loading or code or something similar.
I really must have it as variants and not as separate product page for each diameter of the bowl.

Any suggestions, please?

Thanks in advance.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

9 years 1 week ago [\#281675](#281675) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Sound Player on Variants Pages Fails to Load](/forum/26-product-category-display/892601-sound-player-on-variants-pages-fails-to-load#281675 "-- url of the page with the problem -- :   beautiful-spirit.com/index.php/he/tibet-tester  -- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.30 -- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86&#95;64; rv:56.0) Gecko/20100101 Firefox/56.0  Hi,  I have several sizes of a product (Tibetan singing bowl). Each produces a different sound. On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file. Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page. As soon as I switch to a variant using the drop-down list box, the player stops working.  It is clear to me that it has something to do with dynamic loading or code or something similar. I really must have it as variants and not as separate product page for each diameter of the bowl.  Any suggestions, please?  Thanks in advance.")*

Hello,

You would need to perform some big modifications in the product page if you want to have a different kind of "switch" of content for the variants.
HikaShop is currently doing it by copying the HTML content in some hidden div into the corresponding div in the product page.
It's working very good for almost every content except element which are initialized with some javascript.
So in your case, you'll need to not perform the copy of content but more doing a "hide &amp; display" of blocks ; or you can keep the copy but you'll need to add some javascript to re-initialized the player.

[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 1 week ago [\#281743](#281743) by [bshomer](/forum/user/42675-bshomer "View bshomer's Profile")  Replied by *[bshomer](/forum/user/42675-bshomer "View bshomer's Profile")* on topic *[Sound Player on Variants Pages Fails to Load](/forum/26-product-category-display/892601-sound-player-on-variants-pages-fails-to-load#281743 "-- url of the page with the problem -- :   beautiful-spirit.com/index.php/he/tibet-tester  -- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.30 -- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86&#95;64; rv:56.0) Gecko/20100101 Firefox/56.0  Hi,  I have several sizes of a product (Tibetan singing bowl). Each produces a different sound. On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file. Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page. As soon as I switch to a variant using the drop-down list box, the player stops working.  It is clear to me that it has something to do with dynamic loading or code or something similar. I really must have it as variants and not as separate product page for each diameter of the bowl.  Any suggestions, please?  Thanks in advance.")*

Thanks Jerome,

Hmmm.... That's a bummer.

In that case, trying to avoid a huge hassle, can you give me another tip?

Is there a constant section which I can hook into, which does not change when a variant is selected?
This way, the initialization will be made once when the page is loaded and even when a variant is selected, the code will work.
This way, I'll simply create a modal with all soundtracks for all variants together.
Not the most elegant solution, but I cannot invest so much now in re-writing the product page code only for that.

Thanks very much.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

9 years 6 days ago [\#281782](#281782) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Sound Player on Variants Pages Fails to Load](/forum/26-product-category-display/892601-sound-player-on-variants-pages-fails-to-load#281782 "-- url of the page with the problem -- :   beautiful-spirit.com/index.php/he/tibet-tester  -- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.30 -- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86&#95;64; rv:56.0) Gecko/20100101 Firefox/56.0  Hi,  I have several sizes of a product (Tibetan singing bowl). Each produces a different sound. On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file. Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page. As soon as I switch to a variant using the drop-down list box, the player stops working.  It is clear to me that it has something to do with dynamic loading or code or something similar. I really must have it as variants and not as separate product page for each diameter of the bowl.  Any suggestions, please?  Thanks in advance.")*

Hello,

You can take a look at the view "product / show" to see the blocks generated for the variants.
If you change your product page (product / show_default) if you add your custom content and if it's not in the specific div (that you can found via their ID), your content will be considered as "static".
I hope that my explanation is clear enough.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 6 days ago [\#281866](#281866) by [bshomer](/forum/user/42675-bshomer "View bshomer's Profile")  Replied by *[bshomer](/forum/user/42675-bshomer "View bshomer's Profile")* on topic *[Sound Player on Variants Pages Fails to Load](/forum/26-product-category-display/892601-sound-player-on-variants-pages-fails-to-load#281866 "-- url of the page with the problem -- :   beautiful-spirit.com/index.php/he/tibet-tester  -- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6.30 -- Browser(s) name and version -- : Mozilla/5.0 (X11; Fedora; Linux x86&#95;64; rv:56.0) Gecko/20100101 Firefox/56.0  Hi,  I have several sizes of a product (Tibetan singing bowl). Each produces a different sound. On each product variant page, I place a different HTML with a sound player (Simple Audio Player - Shortcode) and a reference to the appropriate sound file. Upon a first load of the page, the player works well. I even tested it with two different soundtracks on the same page. As soon as I switch to a variant using the drop-down list box, the player stops working.  It is clear to me that it has something to do with dynamic loading or code or something similar. I really must have it as variants and not as separate product page for each diameter of the bowl.  Any suggestions, please?  Thanks in advance.")*

That was very clear.
Thank you very much!!!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTI2MDEtc291bmQtcGxheWVyLW9uLXZhcmlhbnRzLXBhZ2VzLWZhaWxzLXRvLWxvYWQ/dG1wbD1tYXJrZG93bg==) 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.057 seconds

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