| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Creating a 'From' price | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Creating a 'From' price
Say you have a stock item which is available in 5 sizes, currently you would need to put the cheapest item in first and try to work out the price differences between them, which is a) confusing the admin and b) confusing to the customer. This mod will allow you to show a 'From' price for this stock item, and make all option prices absolute (бё1.99) rather than addition prices (+бё0.39).
====== Heres an example of the mod - http://shop.cglass.co.uk/customer/search.php?substring=yacht+varnish - Click on view to see the full product page with it on as well ! Firstly make sure that the 'Extra Fields' module is switched on by going into the module list and checking that a check tick is on it. Now create a extra fields called 'From (бё)' (or literally anything you want to describe it). Also make sure its the first extra field you have, the show box is not checked, and the default value is left blank. Now to the templates ... where the price is displayed (definantly: /customer/main/product.tpl and /customer/main/products.tpl) you will have to use the following logic to create the 'from .....' display: Code:
To remove the + from the product options if its a from price, do the following change in /modules/Product_Options/customer_options.tpl Code:
Code:
And finally how to use this modification, when adding or modifying products. * If the product has a set price, or if the product options is an addition to the set price, leave the 'From' box empty. * If the product has various sizes (for example) at different prices, make the product price 0.00, put the cheapest item price in the From box and then put the product options as their actual price.
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
#2
|
|||||||
|
|||||||
Nice one darrenkierman! Much better! Thanks!
(P.S. I like your popup tooltips. very cool indeed!) |
|||||||
#3
|
|||||||
|
|||||||
Hi darrenkierman
This is great just what I'm looking for. But having a problem with then getting the correct right price passed to the cart. As the cart is looking for Code:
Which is set to 0.00 as per the mod instructions and the lowest price is hel it the extra field. The actual value required to be passed to the cart sits with the product option e.g. Black бё25.00 Red бё27.00 how did you solve this issue? Lost of mods in the cart area of our site Any help in this would be great thanks Hood
__________________
xcart v3.4.12 PHP 4.2.3 MySQL server 3.23.54 Apache/1.3.27 (Unix) |
|||||||
#4
|
|||||||
|
|||||||
From Price
Anyone have this working in 4.xx namely 4.12. I can't seem to figure it out. Cheers Ray
__________________
Rayco XCart 4.0.8 Dev Mysql 4.0.20 Standard Linux(i686) 2.4.27 |
|||||||
#5
|
|||||||||
|
|||||||||
To get this to work in V4.0.12 :
$products[product].param00 becomes $extra_fields[0].field_value that is if the extra field is first in the list. In product_options do this : change{include file="currency.tpl" value=$o.price_modifier display_sign=1} to {if $extra_fields[0].field_value eq ""}{include file="currency.tpl" value=$o.price_modifier display_sign=1}{else}{include file="currency.tpl" value=$o.price_modifier display_sign=0}{/if} I must add i have only been able to do this in product.tpl (and not products.tpl)
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
#6
|
|||||||
|
|||||||
I'm still a little confused on the 4.012 mod... can you show me all the code changes you're making to the mod??
Thanks
__________________
4.0.18 |
|||||||
#7
|
|||||||||
|
|||||||||
UPDATE: Version 4 has a variant option which kind of makes this mod obselete in this version.
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
|
|||
X-Cart forums © 2001-2020
|