Sveinn Dal Sigmarsson Posted April 13, 2010 Share Posted April 13, 2010 I would like to choose selling in Pieces or Meters when ordering. That is when the customer puts in amount in Quantity it is shown if he/she is buying pieces or meters, and when it comes to meters the customers is allowed to put in partial quantities like 2,2 mtrs.Is there anybody there that can help me with this? Link to comment Share on other sites More sharing options...
wwwilliam Posted May 21, 2010 Share Posted May 21, 2010 Hi !I have the same problem right now.If I find some ideas, I'll come back !It's my first business site and I would be proud to come back with some ideas ! :roll: The idea I am investigating, is to put a label right after the quantity input place, saying "m" when the product is sold in meters, or "units", when the selection (might be an attribute) is sold by units.With a code like : IF ... THEN ...ELSEI think this must have happened before, but I found no thread in this forum as of today.Such an indication directly attached to the quantity enter case would be far more clever than asking the consumer to read descriptions, how-to's, or specs to guess what to do ! Link to comment Share on other sites More sharing options...
wwwilliam Posted May 22, 2010 Share Posted May 22, 2010 Well : this is what I did :If there is a more elegant way to reach the objective, please tell me !The idea here is to use a product description parameter which is left unused in your e-commerce process virtualisation.In this case : my customer does not address inventory management, so the variables regarding inventory management are available for other purposes.I used the location of the product in the warehouse : called "emplacement" (french), or "location" (english).When adding a new product, just fill that parameter with the "type of unit" in which the product is ordered.(length-meters, weight-kg, ...)I am considering that the default "quantity" indication is already well adapted to suggest that the product has to be ordered in "units", so there is nothing to change for a product sold unit by unit.When the product is sold meter by meter (like a rope for example), here is the way to have the "enter quantity" block automatically give the "measurement unit" information to the customers :First of all : Go in your product data sheet in the BackOffice. For each product sold "in meters" :enter : "meter(s)" (english) or "metre(s)" (french) where : in the "location" (english) or "emplacement" (french) data entry point.Confirm modification.Second : Open product.tpl. Find the "quantity wanted" paragraph (line 266 approx)After the line : <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> Enter this new line : {if $product->location}{$product->location|escape}{/if} Save the fileResult should look like this : quantity == 0) || $virtual} style="display:none;"{/if}> {l s='Quantity :'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> {if $product->location}{$product->location|escape}{/if} Note : wwwilliam css class could be named differently of course ! Third : Open global.css file. Find the /* product.tpl */ paragraph. (line 1839 approx). Scroll down.Find : #primary_block form#buy_block span.our_price_display{ float:right; } Add a new line after this paragraph.Enter the following class : #wwwilliam{ margin-left: 0.0em; text-align:right; font-size: 12px; font-family: Verdana, Arial, Helvetica, Sans-Serif; float:left; outline: none; } Save your global.css file.Result shouls look like this : #primary_block form#buy_block span.our_price_display{ float:right; } #wwwilliam{ margin-left: 0.0em; text-align:right; font-size: 12px; font-family: Verdana, Arial, Helvetica, Sans-Serif; float:left; outline: none; } #primary_block form#buy_block span#availability_label{ float:left; margin-right:1em; Should work fine.Prestashop version 1.2.5Any feedback is welcome ! Link to comment Share on other sites More sharing options...
Sveinn Dal Sigmarsson Posted July 22, 2010 Author Share Posted July 22, 2010 I was trying to go by williams instructions but could not find these files on my web server : products.tpl and global.css.Can somebody point them out for me.brgdsSveinn Link to comment Share on other sites More sharing options...
wwwilliam Posted July 22, 2010 Share Posted July 22, 2010 Hi !product.tpl is here :...root.../themes/prestashop/product.tplglobal.css is here :...root.../themes/prestashop/css/global.cssEdit with notepad(easy but no text formatting) or dreamweaver (preferably).Hope this helps.wwwilliam Link to comment Share on other sites More sharing options...
Sveinn Dal Sigmarsson Posted July 23, 2010 Author Share Posted July 23, 2010 Thanks wwwilliam,I have changed the files according to your instructions, and it works smooth.Sveinn Link to comment Share on other sites More sharing options...
Fuzas Posted January 6, 2011 Share Posted January 6, 2011 This solution work for me but remain one question, can my client nuy partial units? like 2,3 meters x 5€ ? for example. and the prestashop do the right price?Thanks. in advance Link to comment Share on other sites More sharing options...
Roues Posted January 6, 2011 Share Posted January 6, 2011 partial units? like 2,3 meters x 5€ ? for example. and the prestashop do the right price?Unfortunately, this is impossible, as in 1.3 and so in 1.4 http://www.prestashop.com/forums/viewthread/69258/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now