WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
Hi AllI'm currently configuring Bakery for my wife's fabric business. Most of the items she sells are sold by length rather than as an individual item, so for example a customer may wish to buy 6m of a specific fabric that's priced at say £5 per half metre. At the moment we can obviously ask customers to add multiples of the product to buy larger sizes but if for the example above, if a customer wants 6m they have to add "12" to their cart. Its not rocket science but not entirely intuitive so I'd prefer it if I could change it to suit. Is there an area of code I can edit to change the "Number of Items" display into a dropdown list of say 0.5m,1m,1.5m etc so the amount of fabric required can be directly chosen?thanks in advance
with the option value you can create options for 1m + an 'extra price'2m + an 'extra price'3m + an 'extra price'4m + an 'extra price' etc + that way people will have a dropdownmenu with the 'size' to order ...you can even add an extra field for color ...
<select name="item[ITEM_ID]"> <option value="0.5">0.5</option> <option value="1">1.0</option> <option value="1.5">1.5</option> <option value="2">2.0</option> ....</select>
// Check for blank fields foreach ($_POST as $field => $value) { if ($value == "") { $blanks[] = $field; } }
// Check for blank fields foreach ($_POST as $field => $value) { if ($value == '' AND $field != 'cust_phone') { // Phone optional $blanks[] = $field; } }
if (eregi("phone",$field)) { if (!ereg("^[0-9)(xX +.-]{7,20}$",$value)) { $error_bg[] = $field; $errors[] = htmlspecialchars($value, ENT_QUOTES)." ".$MOD_BAKERY['ERR_INVAL_PHONE']; } }
if (eregi("phone",$field)) { if(!ereg("^[0-9)(xX +.-]{0,20}$",$value)) { // Phone optional $error_bg[] = $field; $errors[] = htmlspecialchars($value, ENT_QUOTES)." ".$MOD_BAKERY['ERR_INVAL_PHONE']; } }
<td class="mod_bakery_main_td_f">[THUMB]<br /><a href="[LINK]"><span class="mod_bakery_main_title_f">[TITLE]</span></a><br />[TXT_PRICE]: [CURRENCY] [PRICE]<br /><select name="item[ITEM_ID]"> <option value="1">0.5m</option> <option value="2">1m</option> <option value="3">1.5m</option> <option value="4">2m</option> <option value="5">2.5m</option> <option value="6">3m</option> <option value="7">3.5m</option> <option value="8">4m</option> <option value="9">4.5m</option> <option value="10">5m</option> ....</select><input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" /></td></form></td>
Complex question?The following problem came up with one of our WB shops:- there are 5 products in the shop- 3 products have different shipping costs for national and international sending- 2 products have no shipping costs at allAfter taking a close look at the settings the only solution I came up with that this is not possible to configure the above data in the shop!Anyone who thinks he/she has the solution...
Hi GuysIs there a way to offer a voucher/discount code during checkout, so for example we can advertise on websites offering a 5% off voucher code, so customers visiting from that advert add in a code (e.g. "SUMMER5" or "FREEPOST") that which will automatically remove 5% or free postage etc when checking out?thanksChris
... but haven't been able to find the answer to where to put the PDT token from Paypal into the backend of the Bakery module.
You might use an old version of the PayPal payment method. Upgrade the plugin by just replacing the full bakery/payment_methods/paypal/ directory by an up to date version (currently v0.4 included in Bakery v1.5.3 and later).
Using something similar to the front end output filter for e-mail addresses, there a way to replace the 3 figure currency reference with a symbol, for example replace "USD" with "$" or "GBP" with "£", so that prices to the customer show as "£5.00" rather than "GBP 5.00"?If you put the symbol in directly to the bakery admin rather than the official 3 figure currency reference, it shows correctly on the website but then the cart doesn't work as Paypal etc doesn't recognise the currency to use.thanksChris