Guest axell66 Posted June 9, 2009 Posted June 9, 2009 Hi Guys Just a quick question: Can I add extra fields to the order form. What I need to do is add a field were to visitor can type in a message/name that they what printed on a item. So it would look some thing like this: --------------------------------------------------------------------- Please type in the message you would like to appear of item: <TEXTBOX> --------------------------------------------------------------------- I could not see this feature in the list on the main Cube Cart site (unless I'm being blind) Many thanks Axel Quote
Guest rapidweb Posted June 14, 2009 Posted June 14, 2009 All our products are imprinted: http://www.beaglepromo.com What you need is a Mod by Estelle. Check this out: Customer Image Upload (and Text Input Fields) CC4 v1.3 The options or text input even shows up on the check pages in the shoppoing cart. Quote
MostlyConfused Posted March 9, 2021 Posted March 9, 2021 I need the same thing, an additional text field during checkout, where customers can enter text to be printed on the product, cakes in this case. Ideally, this should be conditional, for certain products only, but if it shows for every product, that's not a big problem either. Google only found me this very old post. The link above is long gone and was for CC4 anyway. Is there a way in the current version of CC to do this, or another extension? Thanks. Quote
bsmither Posted March 9, 2021 Posted March 9, 2021 This can be done with current product options capabilities. When creating product options (before assigning them to products), you can choose option type "Text" or "TextArea". After assigning this option type to a product, there will be a text field or text area in the options area of the View Product page. Quote
MostlyConfused Posted March 9, 2021 Posted March 9, 2021 Brilliant mate, I never noticed that and it's exactly what I need. Works like a charm, thanks a lot! Quote
MostlyConfused Posted March 9, 2021 Posted March 9, 2021 (edited) Update: One small problem though. I made a testorder with two dropdown-options and one textfield-option. Shows up in the basket and during checkout process. But in the order confirmation I get, there is only the main product and no chosen options at all. Clicking on the view order link in the mail the options show up again. So I suppose this has to be done in E-Mail templates, which I have not touched so far. First thing I find strange ist, that under "Translations" there seem to be two German ones and I have no idea why or which one is used. However, in both of them I found the placeholder for "{$product.product_options}" which I would have thought gives me all chosen options. But why not? Edited March 9, 2021 by MostlyConfused Quote
bsmither Posted March 9, 2021 Posted March 9, 2021 In admin, Languages, what is listed there? Then, in admin, Manage Extensions, what is listed in the Languages section? Quote
bsmither Posted March 9, 2021 Posted March 9, 2021 Please let us know if you are using the shipping module Print Order Form. If so, in admin, Manage Extensions, please let us know if the version being used is v1.2.2 (or 1.3.0 which has a new German translation). Quote
MostlyConfused Posted March 9, 2021 Posted March 9, 2021 Here is what you asked for. I see in Extensions, that the current version of Print Order Form is 1.3.0 which seems to be new. I still have 1.2.2 Quote
bsmither Posted March 9, 2021 Posted March 9, 2021 Missing product options being displayed in the email seems to not be caused by the Print Order Form (an earlier version was found to cause a somewhat different problem). Also, CubeCart sees only one instance of the German language file. So, we still need to determine why the Email Templates listing shows two instances of the German flag. Please use an external database utility to examine the database table CubeCart_email_content. Does anything look strange there? Quote
MostlyConfused Posted March 9, 2021 Posted March 9, 2021 (edited) Indeed it looks a bit strange, with what seem like duplicate entries. I am not aware that I did anything to cause this. Can send you the whole SQL if you like. Edited March 9, 2021 by MostlyConfused Quote
bsmither Posted March 9, 2021 Posted March 9, 2021 I am wondering if, somehow perhaps a bug in the code, installing de-DE "over" the existing de-DE language pack, didn't actually overwrite the existing databased content of the email-contents with the contents of the new file of that incoming language pack. (Unlike the language phrases that exist in a file in a language pack, the phrases of the email-contents file of the language pack are all databased.) I will check on that. In the meantime, you can sort the above listing and delete all rows having 'content_id' equal to or greater than 26. 1 Quote
MostlyConfused Posted March 10, 2021 Posted March 10, 2021 (edited) I have deleted those entries 26 and up. Did not change anything so far in the order confirmation, but I did not expect that. Do you want me to update to Print Order Form 1.3.0 too? The current output of it is working and shows all options. Just not in the emails. Cheers In admin, it looks like it should now: Edited March 10, 2021 by MostlyConfused Quote
MostlyConfused Posted March 10, 2021 Posted March 10, 2021 Another update, when I placed my testorders, I only received confirmation mails as a customer and they contain none of the chosen options. Today I asked my client to forward me her (store owner's) confirmation mails. And there, all options are perfectly shown. Maybe this helps, to narrow down the problem. Quote
bsmither Posted March 10, 2021 Posted March 10, 2021 The POF module prior to 1.2.2 had its own code to email a courtesy email confirming the order was placed. Version 1.2.2 now is supposed to use the established code in CubeCart's core codebase. Looking at 1.2.2 (version 1.3.0 is the same), it seems more work needed was mentioned to the programmers, but didn't get done. So, please make this edit: In the Print Order Form module, gateway.class.php, near line 206, find: if (!empty($item['product_options'])) $product['product_options'] = implode(' ',unserialize($item['product_options'])); Change to: if (!empty($item['product_options'])) { if (($list = unserialize($item['product_options'])) !== false) { foreach ($list as $value) { $item['options'][] = $value; } } else { if(method_exists($order,'unSerializeOptions')) { $options = $order->unSerializeOptions($item['product_options']); } else { if(empty($item['product_options'])) { $options = array(); } else if(($options = cc_unserialize($item['product_options'])) !== false) { } else if (($options = cc_unserialize(base64_decode($item['product_options']))) !== false) { } else { $options = explode("\n", $item['product_options']); } } foreach ($options as $option) { $value = trim($option); if (empty($value)) continue; $item['options'][] = $value; } } } 1 Quote
MostlyConfused Posted March 10, 2021 Posted March 10, 2021 (edited) Instead of nothing at all, this gives me now: Artikel Menge Preis Kirchliche Feste 01 YTozOntpOi01OTtzOjE4OiJUb3J0ZW5mYXJiZW46IHJvc2EiO2k6MTMyO3M6MzE6IkJlc2NocmlmdHVuZzogVG9ydHkgTWNUb3J0ZXJzb24iO2k6MTAzO3M6MzY6IlRvcnRlbmF1c3dhaGw6IEpvZ2h1cnQtUGZpcnNpY2h0b3J0ZSI7fQ== This is still BASE64 encoded. If I decode the string, it reads: a:3:{i:-59;s:18:"Tortenfarben: rosa";i:132;s:31:"Beschriftung: Torty McTorterson";i:103;s:36:"Tortenauswahl: Joghurt-Pfirsichtorte";} so it's an array with the correct value in it. Can't figure out where and what to change though. Edited March 10, 2021 by MostlyConfused Quote
bsmither Posted March 10, 2021 Posted March 10, 2021 My bad. Replace that other new code with this new code: if (!empty($item['product_options'])) { $product['product_options'] = array(); if (($list = unserialize($item['product_options'])) !== false) { foreach ($list as $value) { $product['product_options'][] = $value; } } else { if(method_exists($order,'unSerializeOptions')) { $options = $order->unSerializeOptions($item['product_options']); } else { if(empty($item['product_options'])) { $options = array(); } else if(($options = cc_unserialize($item['product_options'])) !== false) { } else if (($options = cc_unserialize(base64_decode($item['product_options']))) !== false) { } else { $options = explode("\n", $item['product_options']); } } foreach ($options as $option) { $value = trim($option); if (empty($value)) continue; $product['product_options'][] = $value; } } $product['product_options'] = implode("\n", $product['product_options']); } 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.