| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Product Price Converted to Rewards Points VALUE | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Product Price Converted to Rewards Points VALUE
Hello,
When I had an Xcart 4 (classic) Store, I had someone do a conversion for me where it would automatically convert the Price of the product into the quantity of Rewards Points needed to redeem for the same product, so the shopper could see BOTH Dollar Value & Rewards Points Value needed. The conversion was: {math|formatnumeric:',' equation="price * 1000 + 5" price = $product.price} What needs to be changed in this conversion to work with Xcart 5 Multivendor? ALSO: How would the same conversion be added to this Xcart 5 Multivendor template: <div class="product-price {{ this.getFingerprint() }}"> <ul class="product-price product-price-range"> <li class="product-price-base"><span class="price product-price min-of-range">{{ this.formatPrice(this.getMinListPrice(), this.null, 1)|raw }}</span></li> <li class="product-price-base"><span class="price product-price range-delimiter">{{ this.getPriceRangeDelimiter() }}</span></li> <li class="product-price-base"><span class="price product-price max-of-range">{{ this.formatPrice(this.getMaxListPrice(), this.null, 1)|raw }}</span></li> </ul> </div> Thanks in advance for your help.
__________________
Blaine X-Cart Multi-vendor 5.4.1.35 PHP version: 8.1 Blaine's Travel Club - http://blainestravelclub.com Collect Travel Points - http://blainestravelclub.com/travelpoints/rewards/ Travel Points Gift Mall - https://blainestravelclub.com/travelpoints/giftmall/ Grow Your Business - http://blainestravelclub.com/business/ Making Money & Fun - http://blainestravelclub.com/travelers/ Charitable Fun-razing - http://blainestravelclub.com/fun-razors |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Product Price Converted to Rewards Points VALUE
You will need custom module to do that and to modify the appropriate template to show the numbers.
You can do something like {{ (this.getMinListPrice() * 1000) + 5 }} which will do the math and place it in the template but it looks cumbersome Code:
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Product Price Converted to Rewards Points VALUE
Hi Steve,
Thanks so much for your help on this! It took a little trial & error, but it worked exactly how i wanted it to! If you would like to see the finished product look here... https://blainespartynetwork.net/partypoints/giftmall/ Here is the finished code that I used: {## # Price widget #} <br> <div class="product-price {{ this.getFingerprint() }}"> <ul class="product-price product-price-range"> This item FREE with<br> <li class="product-price-base"><span style="color: #bd0014; font-size: 24px;" class="price product-price min-of-range">{{ (this.getMinListPrice() * 1000) + 0 }}</span></li> <li class="product-price-base"><span style="color: #bd0014; font-size: 24px;" class="price product-price range-delimiter">{{ this.getPriceRangeDelimiter() }}</span></li> <li class="product-price-base"><span style="color: #bd0014; font-size: 24px;" class="price product-price max-of-range">{{ (this.getMaxListPrice() * 1000) + 0 }} <img src="http://blainespartynetwork.net/partypoints/giftmall/images/poker_chip_store.png" width="32px" alt="" /></span></li> </ul> or pay cash or use both! <ul class="product-price product-price-range"> <li class="product-price-base"><span class="price product-price min-of-range">{{ this.formatPrice(this.getMinListPrice(), this.null, 1)|raw }}</span></li> <li class="product-price-base"><span class="price product-price range-delimiter">{{ this.getPriceRangeDelimiter() }}</span></li> <li class="product-price-base"><span class="price product-price max-of-range">{{ this.formatPrice(this.getMaxListPrice(), this.null, 1)|raw }}</span></li> </ul> </div> Now, the only thing I need is for the code to place a "comma" at the thousand mark like it did in the old Xcart 4 version: {math|formatnumeric:',' equation="price * 1000 + 5" price = $product.price}... I'm assuming the "{math|formatnumeric:',' " in the code is what made that happen\, but I couldn't figure out how to that into the current Xcart version to make it work... Any ideas? Different code needed? Thanks again & looking forward to your reply, Blaine
__________________
Blaine X-Cart Multi-vendor 5.4.1.35 PHP version: 8.1 Blaine's Travel Club - http://blainestravelclub.com Collect Travel Points - http://blainestravelclub.com/travelpoints/rewards/ Travel Points Gift Mall - https://blainestravelclub.com/travelpoints/giftmall/ Grow Your Business - http://blainestravelclub.com/business/ Making Money & Fun - http://blainestravelclub.com/travelers/ Charitable Fun-razing - http://blainestravelclub.com/fun-razors |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Product Price Converted to Rewards Points VALUE
The price format is something you can set from admin. Thousands delimiter, decimals delimiter, sign, zeros, etc. Look in the settings.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|