• Priority: 0
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 19.03.24, 18:15
  • Opened by: Eric Houde

Ticket #25420 - AMP

amp somnetime not forcing to load when i use a cellulaire.

sometime amp not loading and sometime yes.

what it can be ?


Eric Houde 20 Mar 2024, 02:34

another how i can limit character in amp category product ?

if the name are more then 100 character then remove and add …

wich php page are located the AMP name of product in category page ?

Eric Houde 20 Mar 2024, 05:49

Where i can found php side this var name inside \themes\alysum\templates\mobile\catalog\_partials\miniaturesproduct-miniature.tpl
I want to limit character to 100 to name

Fred 20 Mar 2024, 08:57

Hi, Eric.
I never seen the problem with AMP loading on mobile devices. As I can see now AMP is not loading at all, have you disabled it?
As for the file, you need this one /modules/pkamp/controllers/front/ajaxFilter.php
find getProducts method there
you need to add a loop and cut your description there, like this

if (!empty($products_for_template)) {
  foreach ($products_for_template as $key => $product) {
    $products_for_template[$key]['description] = substr($products_for_template[$key]['description], 0, 100);
Eric Houde 20 Mar 2024, 09:04

Force loading AMP on Smartphones the button is on

strange, how he detect ?

Eric Houde 20 Mar 2024, 09:08

and your code you give not working.
I want to limit character on the name of each product on this page

Fred 20 Mar 2024, 22:38

You can also do that with CSS

.product-title a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
Eric Houde 20 Mar 2024, 23:06

not working, because the name of product when is long its going on 3 line
costume harry
poter de luxe
pas cher

i want its remove character in the third line.
that why i need to use php to limit character

Eric Houde 21 Mar 2024, 00:13

just give me the page and php string who give me .tpl name

Fred 21 Mar 2024, 00:19

I just added that css in my browser and it works just fine, please check https://take.ms/7mVpA

Eric Houde 21 Mar 2024, 00:20

he only limit character to first line. if I have 3 line he will cut all to first lane

original name:
comuste halloween
harry poter
fir kid

I want:
comuste halloween
harry poter…

Fred 21 Mar 2024, 20:11


comuste halloween
harry poter

you want:

comuste halloween
harry poter…

Sorry, but I don't see a logic, how it should be cut. Both names are the same, the only difference is in three dots

Eric Houde 22 Mar 2024, 05:43

Amp not forcing to use amp when you have mobile. What it can be ?

Fred 22 Mar 2024, 09:22

Please update credentials in your profile https://support.promokit.eu/myprofile to access to your Back-office to let me check you configuration

Eric Houde 22 Mar 2024, 09:37

done you can look now

Fred 22 Mar 2024, 20:17

Configuration is ok, now I need to check files, but can't connect to your FTP