Jump to content
thirty bees forum

yaniv14

Trusted Members
  • Posts

    633
  • Joined

  • Last visited

  • Days Won

    29

Posts posted by yaniv14

  1. i dont understand what you mean by default niara medium and not the image of the product.

    you can choose which thumbnail to show based on your image types.

    on the sample i sent its taking the medium_default.

    order history is the page that shows all my purchases history, order-detail is the template that render the order it self (when you click on an order).

  2. yes, inside order-detail.tpl

    just look for this line 

    <div id="order-detail-content" class="table_block table-responsive">

    and after that line you the table. just add another th in the thead and another td to tbody.

    you will also need to modify the tfoot colspans to match the extra column.

    dont forget that 

    {$link->getImageLink($product.link_rewrite, $product.image->id_image, 'medium_default')|escape:'html':'UTF-8'}

    only return the url to the image, so you will need to wrap it inside src tag

  3. you dont need to modify any controller.

    Order->getProducts() already contains image information.

    you can just add to your order-detail.tpl

    {$link->getImageLink($product.link_rewrite, $product.image->id_image, 'medium_default')|escape:'html':'UTF-8'}

     

  4. if you only care about changing the text when you are in English than you dont need the else condition, assuming that your original text is always in the none English language.

    you just need to place whatever you want to replace.

    window.addEventListener('DOMContentLoaded', (event) => {
      const lang = document.documentElement.getAttribute('lang');
      if (lang === 'en-us') {
        const htmlEL = document.querySelector('.unit-price');
        const curHtml = htmlEL.innerHTML;
        htmlEL.innerHTML = curHtml.replace('/ meeter', 'per meter').replace('tk', 'pc.');
      }
    });

     

  5. you js code is broken

    window.addEventListener('DOMContentLoaded', (event) => {
        const lang = document.documentElement.getAttribute('lang');
        if (lang === 'en-us') {
            document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('/ meeter', 'per meter');
        } else if (lang === 'en-us') {
    		    document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('tk', 'pc.');
        }
    }

    you are missing ) at the end, it should be like that

    window.addEventListener('DOMContentLoaded', (event) => {
        const lang = document.documentElement.getAttribute('lang');
        if (lang === 'en-us') {
            document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('/ meeter', 'per meter');
        } else if (lang === 'en-us') {
    		    document.querySelector('.unit-price').innerHTML = document.querySelector('.unit-price').innerHTML.replace('tk', 'pc.');
        }
    })

     

×
×
  • Create New...