Forum Replies Created

Viewing 15 replies - 31 through 45 (of 86 total)
  • Thread Starter abledragon

    (@abledragon)

    Hi there,

    Yes – I was referring to the categories/sub-categories topic.

    There are two stages to my last update:

    First stage: A quick fix to prevent the unexpected result that occurs when you follow the sequence I described. The simplest fix would be to un-check any (and all) non-parent categories when a sub-category is selected.

    Second stage: implementation of the functionality I described.

    Basically, if you can fix the unexpected result that would help me enormously and I’ll live without the extra functionality

    A different option: is it possible to make the categories un-clickable with a custom code snippet and, if so, could you give me that snippet? If it’s a JS solution I’ll add it via a custom JS file so I can still get plugin updates.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I hear what you say re someone not using the hierarchical display. So maybe the logic has to be that if the hierarchical display is being used, then clicking a sub-category automatically selects its parent category. This then enables the example I have used throughout to return the expected result, without disturbing those who are not using the hierarchical display

    BTW – when this is done manually i.e. clicking a sub-category and then clicking its parent category, it returns the initial sub-cat selection – which is the expected result.

    In the previous version of the plugin that process worked perfectly, when done manually, and enabled the example I gave to return the expected result. So the suggestion merely automates a manual process.

    However, the current configuration produces unexpected results – as in this example:

    1. Select Raschel category – expected result 20, actual result 20
    2. Add the Tricot category – expected result 29, actual result 29
    3. Select the 2-bar category under Tricot – expected result 26, actual result 6 (the Raschel category, which is still checked, is now ignored, giving an unexpected result)

    Here’s the link again:

    https://abledragon.com/demosite-1/pre-owned-machinery/warp-knitting-machines/

    To eliminate this unexpected result you will need to grey out all other parent categories when any sub-category is selected.

    That would not meet what I need to achieve but it would, at least, eliminate unexpected results.

    Do please look again at my comment re conditional logic that I made in the first para of this reply. That seems to me to eliminate the unexpected results while at the same time giving site visitors the maximum flexibility (and would meet what I’m trying to achieve..!)

    Cheers,

    Martin.

    [ No bumping please. ]

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I appreciate the work you’ve done but it doesn’t meet the requirement.

    This was that clicking on a sub-category automatically selects its parent category.

    If that requirement was met it would then be possible to select all the machines under one category (by clicking the category) and all machines under a different sub-category, and get the correct result. E.G. Clicking the Raschel category and the 2-bar sub-category under Tricot would return 26 machines.

    This happened correctly on prior versions but only if you also clicked the Tricot category – hence the request to automatically select the parent category when a sub-category was clicked.

    Now, clicking on a sub-cateogry (e.g. 2-bar under Tricot) and on a category (Raschel) does not deliver the 20 Raschel machines – only the 6 2-bar machines.

    Clicking on a Category (Raschel) greys out all subcategories except those under the selected category, but the requirement was to be able to select (for example) all Raschel machines and all Tricot 2-bar machines.

    Further, if I now select the Raschel Category (20 machines), the Tricot category and then the Tricot subcateogry, I get only 6 machines. Previously this selection produced the correct result (26 machines) but now it doesn’t.

    Sorry to be a pain, guys, but can it be set up so that clicking a sub-category automatically selects the parent category? That’s really all I’m asking for.

    That would enable a site visitor to select all the Raschel machines (by clicking the Raschel category) plus the 2-bar Tricot machines (by clicking that sub-category) and return the correct result of 26 machines.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    That would be great, many thanks! And your preferred option (clicking on a single sub-category. . . ) would do the trick and produce the result we are looking for (26 machines, in the example I gave).

    Many thanks – very much appreciated!

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    I’ve not been able to achieve what we need to achieve by selecting different controls in the options screens.

    How about if you make it so that clicking on a category automatically checks all its subcategories and clicking on a single sub-category automatically also checks its parent category..?

    That process delivers the correct result in my example. It also does not change the current behaviour because it produces the same result as just clicking a single subcategory or a parent category does currently.

    Would that be possible..?

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    Sure. Just a final recollection, which, hopefully, may help:

    When I replaced UPCP with ‘ultimate-product-catalogue’ as the domain the translations were retained (in strings translation) but not actually translated.

    After making the domain change on the development site the number of strings against ‘ultimate-product-catalogue’ jumped up from 635 (or something like that) to more than 1,000 (something like 1,059 or similar), with the translations in place but not rendering.

    On the public site on which I did not make the domain change the number of strings are:

    UPCP – 635
    ultimate-product-catalogue – 460

    That comes to the total which was probably the figure I referred to earlier, but I had to copy the translations from UPCP to ultimate-product-catalogue to get the transactions to work.

    Maybe that’s helpful (hope so!),

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    Only the ‘ultimate-product-catalogue.pot’ file is there.

    Unfortunately I copied the working public site back to my development server yesterday so as to have identical sites, and I don’t remember which file the dev site version had. However, as both sites were in sync, and updated at the same time, they have always had the same versions of all plugins, themes and WP core, so I’m sure it will have had ‘ultimate-product-catalogue.pot’.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    It was (still is) on the Strings Translation screen of WPML.

    There’s a drop down at the top that lists the domains present. In that drop down there are strings for both UPCP and ‘ultimate-product-catalogue’.

    This is on the public site, where I had not attempted to edit the domain. I’d done nothing on the public site and I only noticed this when I accessed that screen for the first time.

    The UPCP strings no longer exist on the development site because I ran that SQL query.

    Hope that helps but let me know if I can do anything else.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi Guys,

    OK, I’ve fixed the problem. Just in case anyone else has the same situation here are the steps I took…

    Luckily I had 2 copies of the site – one on my development server and the other available to the public.

    Working on the development site, I changed the text domain from UPCP to ‘ultimate-product-catalogue’ which, as I said, did not fix the problem.

    The ‘ultimate-product-catalogue’ (formerly UPCP) strings that I had translated were all there, translated, and logged as ‘Translation complete’, but they were not rendering translations on the front of the site.

    Changing the text domain to ‘ultimate-product-catalogue’ (via an SQL query in PHPMyAdmin) also eliminated all the UPCP domains (because the query basically said change UPCP to ‘ultimate-product-catalogue’)

    Still on the development site, re-saving the translated strings had no effect. Deactivating and reactivating the WPML, Strings Translation and Product Catalogue plugins had no effect, so I was stuck.

    When I checked the public site I saw that both the UPCP domain and the ultimate-product-catalogue domain were present. The UPCP domain strings had the translations but the equivalent ‘ultimate-product-catalogue’ domain strings did not.

    So I copied the translations from the UPCP strings to the ‘ultimate-product-catalogue’ strings and that finally fixed the problem.

    All the UPCP strings are still in place, alongside the ‘ultimate-product-catalogue’ strings – and I’ll leave them there..!

    My lucky break was that I had 2 copies of the site.

    Hope that helps any others who may have run into this problem.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    Sorry – it seems that changing the text domain did not do the trick.

    I’ve linked to 2 screenshots:

    1 showing the WPML String Translations screen for the text domain ‘ultimate-product-catalogue’ on which I’ve highlighted the Related Products string, which is showing as ‘Translation Complete’ – see here: String Translations Screen Showing Translations Complete

    The other shows the front page of the same site where the ‘Related Products’ is not translated – see here: Non Translated String

    Great if you can suggest next steps,

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Great – many thanks!

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    Many thanks – what is the new value that should be in the text domain..?

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    I mean that the default, English language text is being rendered. None of the strings that I translated are being rendered since the latest update.

    I checked the string translation screen in WPML and the translations that I entered are all in place.

    Nothing was changed on the site, other than to update Product Catalogue (which I did on 2 sites) and on both sites as soon as I checked the front end I saw that the strings for which I had entered translations were rendering the default English language text.

    You can see what I mean here: https://www.preowned.karlmayer.com/zh-hans/%e4%ba%8c%e6%89%8b%e8%ae%be%e5%a4%87/%e7%bb%8f%e7%bc%96%e6%9c%ba/

    In case that link doesn’t work here’s the English version: https://www.preowned.karlmayer.com/pre-owned-machinery/warp-knitting-machines/

    I have two copies of that site, one is on my development server and the link above is to the public site – both sites are affected in the same way.

    Effectively none of the strings for which I provided translations are being translated – they are all rendering the default (English language) text.

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    That did the trick – many thanks!

    Cheers,

    Martin.

    Thread Starter abledragon

    (@abledragon)

    Hi there,

    I probably did change that form (sorry!) and thanks for the snippet above.

    Just for info, when I inserted the code above I got %PRODUCT_PRICE% as the output in the Product Name field, so I took the liberty of fiddling with it – this does exactly what I want:

    [text product-name class:input_boxes '%PRODUCT_NAME%']

    (Ignore the class and, at least on my site, the single quotes work, not the double quotes)

    Many thanks!

    Martin.

Viewing 15 replies - 31 through 45 (of 86 total)