Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Justin

    (@azyrus_pok)

    Hey Wayne,

    if result on sale starts at line 176. (advanced woo search > assets > common.js)

    
                            if ( result.on_sale ) {
                                html += '<span class="aws_result_sale">';
                                html += '<span class="aws_onsale">' + translate.sale + '</span>';
                                html += '</span>';
                            }
    
                            html += '</a>';
    						html += '<a href="https://www.website.com/cart/?add-to-cart= (' + result.post_data.ID + ')" style="float:right;">Add To Cart</a>'
                            html += '</li>';
    

    That did work, unfortunately I can’t provide a demo.

    Good luck!

    Thread Starter Justin

    (@azyrus_pok)

    Hey ILLID,

    I’m hoping to add:

    
    if ( ( typeof response.cats !== 'undefined' ) && response.cats.length > 0 ) {
    
                        $.each(response.cats, function (i, result) {
    
                            html += '<li class="aws_result_item aws_result_cat">';
                            html += '<a class="aws_result_link" href="' + result.link + '" >';
                            html += '<span class="aws_result_content">';
                            html += '<span class="aws_result_title">';
                            html += result.name;
                            html += '<span class="aws_result_count"> (' + result.count + ')</span>';
                            html += '</span>';
                            html += '</span>';
    						html += '<a href="https://www.website.com/cart/?add-to-cart= (' + result.id + ')">Add To Cart</a>'
                            html += '</a>';
                            html += '</li>';
    
                        });
    
                    }
    

    How do you propose I pull the $post_ID into the common.js result.id variable?

    Thanks!

    Forum: Fixing WordPress
    In reply to: Page permalinks
    Thread Starter Justin

    (@azyrus_pok)

    That’s perfect! Thanks Sneff ??

    Forum: Fixing WordPress
    In reply to: Page permalinks
    Thread Starter Justin

    (@azyrus_pok)

    That does sound great but the problem I ran into was that posts cant be added as menu items, which these pages need to be.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)