Post by johan019 » Thu Mar 22, 2018 7:49 pm

Hi,
So, I have been trying to add some code to my product descriptions and I have a lot of code that works. But now, when I am trying to add some more code to it, it just lives its on life and substracts code.
What I have tried: Opencarts Summernote solution and CK Editor. I have also done the regular tips and tricks on clicking out of code view before saving etc.

I will show you a typical code in one of my product description.

Code: Select all

<div class="imgcap">
<p class="av"><b><a href="https://www.avanza.se/borshandlade-produkter/certifikat-torg/om-certifikatet.html/563966/bitcoin-xbt" target="_blank"><img alt="" height="25" src="/image/catalog/avanz.png" width="25" />AVANZA</a></b></p>
<button class="botton" id="btn1" type="button"><span id="fol">Mer info +</span><span id="fol1" style="display:none;">Minska info -</span></button></div>
<div id="fir">
<p>Text.<br />
<b>Avgift:</b> 0 - 15 600kr = 0,25%</p>
</div>
<div id="sec" style="display:none;">Text.<br />
<br />
<b>Avgift: </b>0 - 15 600kr = 0,25%&nbsp;<b>|</b> 15 600 - 46 000kr = 0,15% <b>| </b>46 000 - 143 500kr = 0,069% <b>| </b>143 000kr + = 0%
<p><b>Skatt: </b>ISK</p>
<p><b>Betalsätt: </b>Bankkort, banköverföring</p>
<p><b>Registrering: </b>Ja, Bank-ID</p>
<p><b>Fiat valutor:</b> Ja</p>
</div>

So this is all "working" code that stays intact when saving.
But when I try to add:

Code: Select all

<div class="wpac-rating-custom" data-wpac-chan="product_id_1"></div
The output becomes:

Code: Select all

<div class="wpac-rating-custom" da<="" p="">
??

Anyone know a workaround here? I find it very strange that some code works excellent but when I am trying to add some more it suddenly gets messed up.

Thank you guys!
Last edited by johan019 on Fri May 17, 2019 7:00 am, edited 2 times in total.

New member

Posts

Joined
Fri Mar 09, 2012 12:52 am

Post by johan019 » Thu Mar 22, 2018 8:47 pm

Ok, so I fixed it. Sorry for this.
Solution: Increase product description length (in this case in featured).
controller/module/featured.php
Find

Code: Select all

'description' => html_entity_decode(substr($product_info['description'], 0, 2500 )),]
and change "2500" to desired number. I had it at 1500 which I thought was good enough but apparently not. Increased it so now all my code works just fine.

New member

Posts

Joined
Fri Mar 09, 2012 12:52 am
Who is online

Users browsing this forum: No registered users and 425 guests