Advanced title methods

This topic contains 18 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #20122
    jyrbba
    jyrbba
    Participant

    Hello,

    is there a way to have title conditional logic like so:

    if {title1} has data, show only it, but if not, show {title2}

    I’m using Iconic – Show single variations plugin, which generates “single products” out of all variables. The results show up on your search but It only shows parent title. There is a table for the title which is _jck_wssv_display_title but I hate that it then shows both titles, the parent and the variable title.

    Also is there a way to set up search as static? I have a fixed header that scrolls with the site, but the search doesnt.

    BTW SITE IS LIVE, PLEASE DO NOT ALTER ANYTHING ELSE! ?

    Thanks!

    #20125
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps me a lot.

    I think I understand what you need here, but that is not possible without using custom code, as the title is always set and the conditional fields then would not work.
    Try this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    Scrolling fixed header question
    By default, the plugin should recognize that, when initialize and should fix the results there, but in this case it fails, as the header is only fixed after initial scrolling. Using a bit of custom CSS however will help:

    .asp_r_3 {
        position: fixed !important;
    }

    It will still ‘jump’ once the header fixation happens during the scrolling, but it will be much smoother.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20131
    jyrbba
    jyrbba
    Participant

    Thank you so much, fast support and and worked right out of the box.

    Let me know if you can still help with me this small thing. I’ve attached an image, I tried adding custom field to 2nd description and advanced descrption but I can’t seem to make it work. I’d like to add Woocommerce category “tree” there. You can see what I mean in the file I’ve included.

    Thanks!

    –Jyri

    Attachments:
    You must be logged in to view attached files.
    #20133
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Jyri,

    Well, if most of the items are categorized hierarchically, then you could use the advanced content field syntax like so:

    For all the parameters you can check this documentation. This is not the best way, as non hierarchical items will be still printed separated by ‘>>’, but it’s definitely better than nothing.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20134
    jyrbba
    jyrbba
    Participant

    Thanks again!

    Last one, I promise! 🙂

    {_jck_wssv_display_title}{titlefield}<font style = “color: #2884c5;”> [ – Tarjoushinta: {_sale_price} <font style =”font-size: 80%; color:#555;”>norm.][ {_regular_price}]</font></font>

    Thats my title right now.
    Tarjoushinta = sale price
    norm = normally

    Okay so the problem is that when I use the custom script you gave me for functions.php I lose prices for the variable products. Is there something to modify so that would work aswell?

    #20138
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    No problem 🙂

    I see, that is indeed a problem. How about, using this custom code instead of the previous:

    This will remove the original title from the constructed title, when the custom field exists.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20141
    jyrbba
    jyrbba
    Participant

    Hi,

    sorry to say I can’t get this code to work. Prices are back but titles are not showing again 🙂

    #20143
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, I am not sure then. Maybe the product variation titles are conflicting in some way. Perhaps this variation:

    If this does not work, then I think I will need temporary FTP access to debug this directly. In that case, can you please also link me a product, on which this should work on? Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20144
    jyrbba
    jyrbba
    Participant

    Damn, it’s very close. Now it’s showing the variable attribute, not the title. The first code displayed it just right, it only lost the price from it.

    –Jyri

    Attachments:
    You must be logged in to view attached files.
    #20148
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20149
    jyrbba
    jyrbba
    Participant
    You cannot access this content.
    #20151
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thanks for the details, I think I have managed to find a solution. I have changed the advanced title field like so:

    <font style = "color: #2884c5;"> [ - Tarjoushinta: {_sale_price} <font style ="font-size: 80%; color:#555;">norm.][ {_regular_price}]</font></font>

    The {titlefield} is no longer there, it is automatically added before the rest of the field
    ..and also the custom code a bit:

    It should display the result titles correctly now.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20152
    jyrbba
    jyrbba
    Participant

    Thank you so much. Support 5/5! 🙂

    Br. Jyri

    #20154
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20213
    jyrbba
    jyrbba
    Participant

    Hello,

    is getting such php error log from the plugin, anything to be worried about?

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.