Jump to content

Show product pricing on another page of my site?


Trilient

Recommended Posts

Hello everyone,

I'm looking for a way to include these lines from products.tpl (below) on another template file of my website, or at least something similar to it. I'm not really sure how to go about it, but I'd like to have a way to set which product ID it pulls the data from via a variable of some sort. I'm planning to use it on this page of my site: http://gsdemon.com/gameservers.php and from what I've read, going the route of Data feeds may not be my best option. I also found a free hook online that almost does what I'd like it to, but it doesn't seem to pull the correct data from MySQL as my pricing is based on configurable options, and I know next to nothing about SQL queries.

From products.tpl:

<div id="product{$num}" class="product" onclick="window.location='cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}'">
<div class="pricing">
    {if $product.bid}
    {$LANG.bundledeal}<br />
    {if $product.displayprice}
    <span class="pricing">{$product.displayprice}</span>
    {/if}
    {else}
    {if $product.pricing.hasconfigoptions}
    {$LANG.startingfrom}
    <br />
    {/if}
    <span class="pricing">{$product.pricing.minprice.price}</span>
    <br />
    {if $product.pricing.minprice.cycle eq "monthly"}
    {$LANG.orderpaymenttermmonthly}
    {elseif $product.pricing.minprice.cycle eq "quarterly"}
    {$LANG.orderpaymenttermquarterly}
    {elseif $product.pricing.minprice.cycle eq "semiannually"}
    {$LANG.orderpaymenttermsemiannually}
    {elseif $product.pricing.minprice.cycle eq "annually"}
    {$LANG.orderpaymenttermannually}
    {elseif $product.pricing.minprice.cycle eq "biennially"}
    {$LANG.orderpaymenttermbiennially}
    {elseif $product.pricing.minprice.cycle eq "triennially"}
    {$LANG.orderpaymenttermtriennially}
    {/if}
    <br>
    {if $product.pricing.minprice.setupFee}
    <small>{$product.pricing.minprice.setupFee->toPrefixed()} {$LANG.ordersetupfee}</small>
    {/if}
    {/if}
  </div>
</div>

 

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