We managed to display in the backend a conditional that is built to do the following
A product editor that has Title, ..., Related products
Each product title is made of 2 letters + dash sign, such as AW-225F, AW-DfFF555, FB-FDFD5S, FB-SD2858...
Because there are 3K+ products, and we will always relate products within the same group of products starting with the same 2 letters
so in the related products multi record, we don't want to see the 3K products but just those who start with the same 2 letters as the current product title, and then be able to select multiple products from the narrowed down list.
Here is the code that we came up with that works!
SELECT num, title
FROM `<?php echo $TABLE_PREFIX ?>products`
$value = $ESCAPED_FILTER_VALUE;
$type = substr($value,0,2); ?>
WHERE title LIKE '<?php echo $type; ?>%'
<?php } ?>
Everything works fine, when editing a product, it only shows in the related products field the products that start with the same 2 letters, but VERY STRANGE, the entire website takes 30sec and more to load - If we remove the code above, the website acts fine.
Are we doing anything wrong?
Attaching a screenshot
Thanks so much!
Is this issue happening on every front end page or just on pages which interact with your products section in some way? I think looking into this issue will be a lot easier if I had access to the site, please could you fill out a second level support request for me? You can find the form here:
PHP Programmer - interactivetools.com