Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • diochi1144 Friend
    #1012212

    On page http://www.diochi.9e.cz/index.php?Itemid=942&option=com_k2&view=itemlist&task=category&id=166 Displaying the price of the item using a javascript API. If I use the filter value is not displayed. Look at the "Astofresh Ernst". Can it somehow solve?

    Mo0nlight Moderator
    #1012410

    Hi,

    Not entirely due to the Javascript error, maybe caused by one of following reasons:

    1. There is error with API somewhere as it returns 404. You can try using display error of PHP to see what’s wrong.

    2. The data code you pass is not correct, only the data AC14000082, AC14000081 are the right ones. all the data start with CZ is getting errors.

    The problem not due to the javascript but mostly because of error in API or the data you pass to API.

    Kindly check again.

    Regards


    1. Screen-Shot-2017-02-21-at-1.51.24-PM
    diochi1144 Friend
    #1012430

    Thank you.
    Yes, it is a test site. The data "CZ*" I do not have values. It is correct.
    But with data "AC14000081" (Astofresh Ernst) like the price displayed correctly.
    If I use a filter (try the "kapsle") the price not displayed.
    It seems that is unsuccessful question at this price.
    I can not figure out why the query is unsuccessful.

    Mo0nlight Moderator
    #1012434

    Hi.

    Because you use ajax for filter so after filter done you have to call the javascript show price one more time.

    Open the file : modules/mod_jak2filter/assets/js/jak2filter.js

    Look for :

    //highlight search team in result
    jak2Highlight(container, jQuery('.ja-k2filter input[name="searchword"]').val());

    Place the show price code under this.

    And query is unsuccessful depend on server api and i could not help you with that.
    maybe because some thing like this. This is the error message show up when i access your site.
    {
    "success": false,
    "payload": [],
    "error": {
    "code": 403,
    "message": "Forbidden POST requests from foreign countries, please, allow it in site settings"
    }
    }

    diochi1144 Friend
    #1012485

    Thank you. If in your component disabled AJAX search, it works correctly. But it will not slow or it will not interfere with anything? I can not embed display prices in modules modules/mod_jak2filter/assets/js/jak2filter.js. If you tell me that he was willing to help, I will restore access to the administration and FTP (access the same as last time). Viewing item is /templates/eximium/html/com_k2/templates/pripravky/category_item.php on line 162 and javascript is /eshop/app.js

    I tested with disabled AJAX search.
    I’ll need to use.
    Can you please clarify yet, how do I receive the prize in modules/mod_jak2filter/assets/js/jak2filter.js?

    Mo0nlight Moderator
    #1012705

    Hi.

    You could try place the code.

    allProducts();

    under this code.

    //highlight search team in result
    jak2Highlight(container, jQuery('.ja-k2filter input[name="searchword"]').val());
    diochi1144 Friend
    #1012765

    Yes it is working. Thank You.

    I suppose it can not override in the template.
    After the upgrade I have to change it again?

    Mo0nlight Moderator
    #1012787

    You’re right, this change is applied in the base file so you will need to backup first before updating.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 7 replies, has 2 voices, and was last updated by  Mo0nlight 7 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum