X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   MAP Pricing Mod (https://forum.x-cart.com/showthread.php?t=8079)

DogByteMan 08-04-2004 11:13 AM

ETInteractive.com,

Yes I did however I assumed you meant for one of the variables to be lbl_amazing_price.

I will post the code that does not work yet provides no errors shortly.

DogByteMan 08-04-2004 12:17 PM

products.tpl
Code:

{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if $products[product].param00 ne "Y"}
{if $products[product].price ne 0}
{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].price lprice=$products[product].list_price format="%d" assign=discount}
<font class=MarketPrice>{$lng.lbl_market_price}: <s>
{include file="currency.tpl" value=$products[product].list_price}
</s></font>
 
{/if}
<font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}, save {$discount}%{/if}{if $config.Taxes.use_vat eq "Y" and $products[product].vat gt "0"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if}
{else}
<font class="RedLink">{$lng.lbl_amazing_price}</font>
{/if}
{else}

<font class="ProductPrice">{$lng.lbl_map_price}</font>

 
{/if}
{/if}
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}


product.tpl
Code:

{*if $product.weight ne "0.00"}<tr><td width=30%>{$lng.lbl_weight}</td><td nowrap>{$product.weight} {$config.General.weight_symbol}</td></tr>{/if*}
{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product.tpl"}
{/if}
{if $active_modules.Subscriptions ne "" and $subscription}
{include file="modules/Subscriptions/subscription_info.tpl"}
{else}
<tr><td>
</td></tr>
<tr><td class=ProductPriceConverting>{$lng.lbl_price}:</td>
<td>
{if $product.param00 ne "Y"}
{if $product.price ne 0}
<font class=ProductPriceConverting>{$lng.lbl_price}:</font>
<font class=ProductDetailsTitle>{include file="currency.tpl" value=$product.price}</font><font class=MarketPrice> {include
file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.price}</font>{if
$config.Taxes.use_vat eq "Y" and $product.vat gt "0"}, {$lng.lbl_including_vat}
{$product.vat}%{/if} {else}
<font class="RedLink">{$lng.lbl_amazing_price}</font>
{/if}
{else}

 
{$lng.lbl_map}
 
{$lng.lbl_map_price}
{/if}
{/if}
</td>
</tr>
{/if}
</table>


 
<table border=0 width=100% cellpadding=0 cellspacing=0>
<tr><td colspan=2>
<font class=ProductDetailsTitle>{$lng.lbl_options}</font>
</td></tr>


ETInteractive.com 08-05-2004 04:33 AM

Quote:

Originally Posted by DogByteMan
ETInteractive.com,

Yes I did however I assumed you meant for one of the variables to be lbl_amazing_price.

I will post the code that does not work yet provides no errors shortly.


dogbyte, that code is for products have have a 0.00 price. The client wanted people to call for pricing on items that they couldn't advertise for.

You probably dont need that part.

ETInteractive.com 08-05-2004 04:36 AM

'try this:
(plz post what your seeing, screenshots)

products.tpl
Code:

{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if $products[product].param00 ne "Y"}
{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].price lprice=$products[product].list_price format="%d" assign=discount}
<font class=MarketPrice>{$lng.lbl_market_price}: <s>
{include file="currency.tpl" value=$products[product].list_price}
</s></font>
 
{/if}
<font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}, save {$discount}%{/if}{if $config.Taxes.use_vat eq "Y" and $products[product].vat gt "0"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if}
{else}
<font class="ProductPrice">{$lng.lbl_map_price}</font>

 
{/if}
{/if}
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}


product.tpl
Code:

{*if $product.weight ne "0.00"}<tr><td width=30%>{$lng.lbl_weight}</td><td nowrap>{$product.weight} {$config.General.weight_symbol}</td></tr>{/if*}
{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/product.tpl"}
{/if}
{if $active_modules.Subscriptions ne "" and $subscription}
{include file="modules/Subscriptions/subscription_info.tpl"}
{else}
<tr><td>
</td></tr>
<tr><td class=ProductPriceConverting>{$lng.lbl_price}:</td>
<td>
{if $product.param00 ne "Y"}
<font class=ProductPriceConverting>{$lng.lbl_price}:</font>
<font class=ProductDetailsTitle>{include file="currency.tpl" value=$product.price}</font><font class=MarketPrice> {include
file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.price}</font>{if
$config.Taxes.use_vat eq "Y" and $product.vat gt "0"}, {$lng.lbl_including_vat}
{$product.vat}%{/if} {else}

 
{$lng.lbl_map}
 
{$lng.lbl_map_price}
{/if}
{/if}
</td>
</tr>
{/if}
</table>


 
<table border=0 width=100% cellpadding=0 cellspacing=0>
<tr><td colspan=2>
<font class=ProductDetailsTitle>{$lng.lbl_options}</font>
</td></tr>


DogByteMan 08-05-2004 06:31 PM

That Worked :D THANKS!

ETInteractive.com 08-06-2004 12:09 PM

Sure 8)

chilll33 08-16-2004 07:50 PM

MAP Pricing Mod
 
Will this work with 4.0.1 and above?

ETInteractive.com 08-17-2004 03:57 AM

The "idea" will work, not sure about the actual TPL code. I haven't tried 4.0. But making an extra field and setting up the language vars then doing smarty IF statements will work. Just gotta play with it a bit.

chilll33 01-06-2005 11:27 PM

Quote:

Originally Posted by ETInteractive.com
The "idea" will work, not sure about the actual TPL code. I haven't tried 4.0. But making an extra field and setting up the language vars then doing smarty IF statements will work. Just gotta play with it a bit.


After a few hours I have been able to get this to work with 4.0.9 but only in product.tpl

http://www.wiredparadise.com/shop/product.php?productid=20969&cat=0&page=1

I have no idea how to call the extra fields from products.tpl

any ideas?

ETInteractive.com 01-07-2005 06:01 AM

your not using products.tpl

if you have multiple rows of products (you have 3 per row)

you need to customize "products_t.tpl"

the code would be basically the same at product.tpl to display the MAP.


All times are GMT -8. The time now is 09:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.