Jump to content

mihai666g

Senior Member
  • Content count

    26
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mihai666g

  • Rank
    Member
  1. Hi @Kian I tested your hook and is working for Basic URLs option but is not working for Full Friendly Rewrite option. I get this url when I use on Full Friendly Rewrite https://site.com/knowledgebase/3/index.php?rp=/knowledgebase/3/Example-Code-(PHP).html Any chance you can adapt the hook for Full Friendly Rewrite option? thanks,
  2. mihai666g

    if product id in cart

    .... somehow now is working, I just deactivated my custom theme file and reactivated it.... my brain hurts Thanks guys for patience.
  3. mihai666g

    if product id in cart

    Thi is the error: Smarty Error: Syntax error in template "file:/home/xxxxxxxxxxx/public_html/mi.xxxxxxxx.com/templates/lagom/core/pages/viewcart/xxxxxx/viewcart.tpl" on line 2 "{foreach $products as $num => $product}" missing 'item' attribute
  4. mihai666g

    if product id in cart

    I tried every scenario, the code is not working and is breaking the page. Normal page, https://prnt.sc/repaxo, added the code https://prnt.sc/repbgb and this is the output https://prnt.sc/repbs7
  5. mihai666g

    if product id in cart

    Yes, I tried and is not working.
  6. mihai666g

    if product id in cart

    ? i was saying it is not working
  7. mihai666g

    if product id in cart

    I tried and it breaks my page, css + js gone.
  8. mihai666g

    if product id in cart

    Hi brian! I'm trying to do something like op in viewcart but $product.pid is not a variable there I use in configureproductdomain.tpl this "{if $templatefile == 'configureproductdomain' && in_array($productinfo.pid, $prodID)}" and is working because is a simple array, but in viewcard is a multidimensional array and in_array is not working here. How can I get the product pid from viewcart so I cand create an if condition? thanks
  9. mihai666g

    getting list of all domains in one variable

    Thanks, that's what I wanted.
  10. mihai666g

    Adding second currency in invoices

    my problem was from lagom code in the file, I created the overwrite file and solved the problem. Don't know if this applies to you if you don't use lagom theme
  11. Hi, I trying to display a notification on configuredomains.tpl page if the client order a .de domain I managed to get it working but because I use foreach the message is displayed multiple times if the client has multiple domains with that extension {if $domains} {foreach $domains as $num => $domain} {if strpos($domain.domain, '.de') !== false} code {/if} {/foreach} {/if} Since I have no programming experience I don't know how to store the domains in a variable/string so I can get rid of foreach Any tips are appreciated.
  12. mihai666g

    Adding second currency in invoices

    Yea, you are right, the code is good. The problem was solved by removing the extra code that comes with my teme. https://prnt.sc/r642b9 Thanks man.
  13. mihai666g

    Adding second currency in invoices

    Thanks for reply, I tried with this and I still get the Ooops page.
  14. mihai666g

    Adding second currency in invoices

    Hi brian! I have a similar problem like MikeS24 , I managed to get a secondary currency on the viewinvocie.tpl page using the info from this post but I encountered a problem when trying to get the second currency on invoicepdf.tpl Here is the code that I try to manipulate if($clientsdetails["countryname"] == "Romania" & $clientsdetails["currency"] == "1"){ # Invoice Items daca client din romania si are currency euro $tblhtml = '<table width="100%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0"> <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:center;"> <td width="60%">' . Lang::trans('invoicesdescription') . '</td> <td width="20%">' . Lang::trans('sumaeurProforma') . '</td> <td width="20%">' . Lang::trans('sumaronProforma') . '</td> </tr>'; $clientcurrency = $clientsdetails["currency"]; if ($clientcurrency == 1) { $exchangerate = Capsule::table('tblcurrencies')->where('code','RON')->value('rate'); } foreach ($invoiceitems as $item) { $tblhtml .= ' <tr bgcolor="#fff"> <td align="left">' . nl2br($item['description']) . '<br /></td> <td align="center">' . $item['amount'] . '</td> <td align="center">'.$exchangerate.'</td> </tr>'; } $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicessubtotal') . '</td> <td align="center">' . $subtotal . '</td> <td align="center">' . $subtotal . '</td> </tr>'; if ($taxname) { $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . $taxrate . '% ' . $taxname . '</td> <td align="center">' . $tax . '</td> <td align="center">' . $tax . '</td> </tr>'; } if ($taxname2) { $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . $taxrate2 . '% ' . $taxname2 . '</td> <td align="center">' . $tax2 . '</td> <td align="center">' . $tax2 . '</td> </tr>'; } $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicescredit') . '</td> <td align="center">' . $credit . '</td> <td align="center">' . $credit . '</td> </tr> <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicestotal') . '</td> <td align="center">' . $total . '</td> <td align="center">' . $total . '</td> </tr> </table>'; $pdf->writeHTML($tblhtml, true, false, false, false, ''); $pdf->Ln(5); }else{ # Invoice Items normal $tblhtml = '<table width="100%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0"> <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:center;"> <td width="80%">' . Lang::trans('invoicesdescription') . '</td> <td width="20%">' . Lang::trans('quotelinetotal') . '</td> </tr>'; foreach ($invoiceitems as $item) { $tblhtml .= ' <tr bgcolor="#fff"> <td align="left">' . nl2br($item['description']) . '<br /></td> <td align="center">' . $item['amount'] . '</td> </tr>'; } $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicessubtotal') . '</td> <td align="center">' . $subtotal . '</td> </tr>'; if ($taxname) { $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . $taxrate . '% ' . $taxname . '</td> <td align="center">' . $tax . '</td> </tr>'; } if ($taxname2) { $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . $taxrate2 . '% ' . $taxname2 . '</td> <td align="center">' . $tax2 . '</td> </tr>'; } $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicescredit') . '</td> <td align="center">' . $credit . '</td> </tr> <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">' . Lang::trans('invoicestotal') . '</td> <td align="center">' . $total . '</td> </tr> </table>'; $pdf->writeHTML($tblhtml, true, false, false, false, ''); $pdf->Ln(5); } I added the "use Illuminate\Database\Capsule\Manager as Capsule;" in the file but something is wrong with: $clientcurrency = $clientsdetails["currency"]; if ($clientcurrency == 1) { $exchangerate = Capsule::table('tblcurrencies')->where('code','RON')->value('rate'); } Can you tell me what I did wrong here?
  15. Hi, I want to send an email to all of my customers and list in the email all the domains with the extension .XX that they have. I see that whmcs has something like {foreach from=$array_data item=data} {$data.option}: {$data.value} {/foreach} but I dont know how to create a foreach querry. The output of the foreach query should look like this in the email <tr> <th>$domain</th> <td>{$domain_expiry_date}</td> </tr> <tr> <th>$domain</th> <td>{$domain_expiry_date}</td> </tr> Can somebody help me with this? I can pay $10 via paypal.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated