2

first, a picture with some explanations. Then some questions...

Description of the behaviour of my website

The question is, can I somehow find out why the Text "Ab" is missing in some cases (when I initially load the website).

With the developer tools in the browser I found that it is triggered by some CSS? But I have no clue what to do from there. I want to change this behaviour, that the initial state is "show 'Ab' near the price".

Developer tools view from the browser

Does anybody know how I can "debug" this on the server? What are the steps to find out more?

If you want to take a look at the web page on our staging server (if links are not allowed, tell me and I remove it): https://staging.relax-pillow.de/set-stillkissen-maxi-mit-bezug-grosse-210-x-44-cm.html

1 Answer 1

2

You can try the following steps to troubleshoot the issue:

  • First of all Enable Developer Mode using php bin/magento deploy:mode:set developer command.

  • If you have third-party extensions, consider disabling them one by one to see if any of them are causing the issue.

  • Check XML layout files (e.g., catalog_product_view.xml in your theme or module) to see if there are any customizations affecting the product page layout.

  • Enable Template Path Hints: In the Magento admin panel, navigate to Stores > Configuration > Advanced > Developer and enable Template Path Hints. This will show you which template files are responsible for rendering specific elements.

  • Debugging JavaScript: Add console.log statements in your JavaScript code to output messages to the browser console. Review JavaScript files related to the product page and check for conditions that might affect the display.

  • then find the <span class="price-label" style="display: inline;"> or a class="price-label" or "Ab" or "Away". if you find this one then remove it and resolve your issue.

  • If you're unable to pinpoint the exact location of the issue, you can resolve it by adding the following CSS to your file: .product-options-bottom .price-box .price-label,.product-info-price .price-box .price-label {display: none !important;} i know this is not an ideal solution but it can serve as a temporary workaround.

Remember to back up your code and database before making significant changes, and proceed with caution when modifying configuration files or uninstalling or disable modules

8
  • A lot of new approaches to try out. Great, because I was stuck. I'll try the things and post my new information here, as soon as I worked through these tipps! Thanks a lot...
    – Kai Mechel
    Commented Jan 1 at 13:29
  • 1
    If you find yourself in need of help, don't hesitate to reach out. Commented Jan 1 at 15:12
  • Ok, results yet... the error is present in the unchanged Porto theme too. It's not in the modifications I made to prepare the shop to be compliant with our laws. Now I am trying your suggestion with the log statements to find out how the code is run through. Because running through some code paths produce the correct display of "starting from / Ab". My problem is that my holidays are over and I have to work in my "real job" - this shop is my 'second' job... for my sister, it's her shop (and my spare time :-) ) I think it's in 'final_price.phtml' in Catalog and ConfigurableProduct...
    – Kai Mechel
    Commented Jan 4 at 16:57
  • 1
    Glad to know that your problem has been resolved. Commented Jan 11 at 11:47
  • 1
    Me too... that one was a brain teaser for me :-) but - always a thing to learn, that's why your comments were so helpful to get more insight and ideas how to start with things like these. Very helpful!
    – Kai Mechel
    Commented Jan 12 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.