Jump to content

product.tpl


samu

Recommended Posts

Hi All,

 

I am new bie to WHMCS, i need to include the product.tpl file in one of my file i tried using the following gode to get the file,

<?php

$start_text = "<!--SWPRODUCTLIST_START-->";

$end_text = "<!--SWPRODUCTLIST_END-->";

$source = file_get_contents('https://billing.sitename.com/cart.php?gid=3');

$start_pos = strpos($source, $start_text) + strlen($start_text);

$end_pos = strpos($source, $end_text) - $start_pos;

$found_text = substr($source, $start_pos, $end_pos);

$found_text = str_replace("/cart", "https://sitename.com/cart", $found_text);

echo $found_text;

?>

 

but i am getting whole page instead of the particular part... help me out

 

 

thanks in advance

 

/samu

Link to comment
Share on other sites

any one please help me out.. i am getting the whole product.tpl page while putting the script. i mean header and footer and other parts coming. i need only the products section...

 

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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