NooseLadder Posted September 12, 2014 Share Posted September 12, 2014 @apeisa or anybody who can edit the module page This is the second time I have used the shopping cart module, first time in 2012 and the second time fallen into the trap of following the text titled 'Instructions' on the module page. There are some errors there. e.g 4. Add <?= $modules->get("ShoppingCart")->renderAddToCart(); ?> to your product template. If you don't like the markup it generates, you can put the wanted markup directly into template. Should be: 4. Add <?php echo $modules->get("ShoppingCart")->renderAddToCart(); ?> to your product template. If you don't like the markup it generates, you can put the wanted markup directly into template. The text under title 'Read Me' is an almost duplicate of the 'Instructions' but with some corrections. Suggest that the instructions section is removed and only the Read Me section left there. Also, suggest that you instruct to add reference to the product: 4. Add <?= $modules->get("ShoppingCart")->renderAddToCart($product); ?> Otherwise, thank you for this module it is very helpful. My next challenge is to integrate SagePay payment processor. Link to comment Share on other sites More sharing options...
videokid Posted September 19, 2014 Share Posted September 19, 2014 Hello, is it wise to install Soma's or Apeisa's version on pw 2.5.x? Thanks Link to comment Share on other sites More sharing options...
douglas81 Posted September 19, 2014 Share Posted September 19, 2014 How's the new version of the shop going? I'm currently using Stripe, but with a third party cart/checkout app called SendOwl. It would be great, however, to bring everything under one roof, so to speak, and use PW for all my shop needs also. One burning question. I know you plan to support digital downloads, but will you also be allowing those downloadable files to be hosted on Amazon S3? If yes, I would probably weep with happiness Second burning question... it's sounds like this new shop module is not going to be a free module, right? Can you give any indication of price? 3 Link to comment Share on other sites More sharing options...
Basil Posted September 22, 2014 Share Posted September 22, 2014 Hello i allso want to ask How's the new version of the shop going??? i am very interest of buy! thank you. 3 Link to comment Share on other sites More sharing options...
POWERFULHORSE Posted October 7, 2014 Share Posted October 7, 2014 I'm trying to build an ajax driven cart/checkout system with this module but running into some problems. I'm basically posting the serialized form data via ajax to each url (i.e. checkout/, checkout/confirmation/ etc) and appending the returned data, or the next step in the process, to the page. However I'm not sure if the data I'm posting is being saved as session variables or why it wouldn't be?Does anyone have any experience with this module and ajax and could help me understand why it wouldn't work? Link to comment Share on other sites More sharing options...
NooseLadder Posted October 16, 2014 Share Posted October 16, 2014 Hello, is it wise to install Soma's or Apeisa's version on pw 2.5.x? Thanks I've only just seen your question. I have Apeisa's module installed on 2.5.2 and it works ok. The main reason I am here though is to ask a question probably @Apeisa or @Soma: On the product page where the add to cart button is included. As well as using the $qty and $product_id variables in the ShoppingCart.module, I want to add additional select dropdowns within the current form whose selections get posted when the add to cart button is submitted: $out = "<form method='post' action='$postUrl'>"; $out .= "<input type='hidden' value='{$product->id}' name='sc_product_id' />"; $out .= "Qty: <input type='number' name='sc_qty' value='1' min='0' />"; $out .= "<input type='submit' value='" . $this->_("Buy now") . "' />"; $out .= "</form>"; I simply need to know what other lines in the module would need to be updated and how if I add a simple: $out .="<select name='wtf' id='wtf'> <option value='' selected='selected'>-- select option --</option> <option value='one'>1</option> <option value='two'>2</option> <option value='three'>3</option> </select>"; 1 Link to comment Share on other sites More sharing options...
apeisa Posted October 16, 2014 Share Posted October 16, 2014 Not sure I understand what you are doing. Product variations? Link to comment Share on other sites More sharing options...
NooseLadder Posted October 17, 2014 Share Posted October 17, 2014 Hi, yes I should explain myself better. I am getting images of different colours for the same product so that when the colour is selected the appropriate coloured image is displayed. $colours = $product->get("colours"); $finishes = $product->get("finish"); $initialImageUrl = $product->productImage->url; $colourImages = $product->get("images"); echo "<form action='./' method='post'> <select name='image' id='image' class='inputbox' size='1'> <option value='".$initialImageUrl."' selected='selected'> - Select Colour / Finish - </option>"; foreach ($colourImages as $colourImage) { $colourImageUrl = $colourImage->url; $colourText = $colourImage->description; echo "<option value='".$colourImageUrl."'>".$colourText."</option>"; } echo "</select> </form>"; This form is currently outside of the add to cart form. I want to be able to post the selection to the cart along with sc_price and qty. I will have to convert the selected image url to a colour name e.g green = /site/assets/files/1281/productgreen.png. I can obviously include the selector within the add to cart form but the shoppingCart.module will need some changes to make sure the selection is posted to the cart along with the product title. This is the part I am not sure how to do. I hope that helps? Initial colour of product when page is loaded:Selected colour e.g. green:So when the product is added to the cart the colour is also displayed: 1 Link to comment Share on other sites More sharing options...
apeisa Posted October 17, 2014 Share Posted October 17, 2014 I have always done that kind of stuff using subpages or repeaters. So each variation is page too. Link to comment Share on other sites More sharing options...
apeisa Posted October 21, 2014 Share Posted October 21, 2014 Sorry for poor communications from my part. New shop module is currently in closed beta testing. I am pretty busy at the moment (both work and personal), so there is not too much focus on this. For the pricing I am thinking something like 50€ - 99€ for single site license. Also currently (slowly) building full featured shop profile, that would be single purchase and free to use parts or fully as many times as wanted (single site license required for all new shops though). 10 Link to comment Share on other sites More sharing options...
Basil Posted October 22, 2014 Share Posted October 22, 2014 Thank you apeisa... Cant wait to buy it!! when you have some demo let us now. Link to comment Share on other sites More sharing options...
dazzyweb Posted October 22, 2014 Share Posted October 22, 2014 For all you interested in e-commerce and pw: I am working on new set of modules to create really robust base for pw e-commerce. Some of the modules will be open sourced (like general payments modules, stripe is already done, released soon) and some will be commercial. I hope to release these this summer, along with full featured shop profile. @apeisa Can't wait to see your pw e-commerce solution. I am a little confused how it will be released or in what format. Will some of the modules still be open sourced or will they all be bundled together now under a single site licence? Sorry for poor communications from my part. New shop module is currently in closed beta testing. I am pretty busy at the moment (both work and personal), so there is not too much focus on this. For the pricing I am thinking something like 50€ - 99€ for single site license. Also currently (slowly) building full featured shop profile, that would be single purchase and free to use parts or fully as many times as wanted (single site license required for all new shops though). Have you considered releasing the shop module/modules in a similar format to others such as woocommerce whereby the basic shop plugin is open source and free with then optional paid extensions (commercial plugins)? 1 Link to comment Share on other sites More sharing options...
iNoize Posted October 30, 2014 Share Posted October 30, 2014 Hi i got 2 products in my shop (im in developing stage) One product has price of 50.12, second 120 The one with price 120 will add to cart without a problem, the other one will not. Im working on ProcessWire 2.3.0.3. here is the error: Error: Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12, session_id = '47d81138ac1a7315664741263203c18aef6a7422' ON DUPLICATE KEY UPD' at line 1 (in C:\xampp\htdocs\projects\chemik\www\wire\core\Database.php line 118) #0 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(162): Database->query('INSERT INTO Sho...') #1 [internal function]: ShoppingCart->___addProductToCart(Object(Page), 1) #2 C:\xampp\htdocs\projects\chemik\www\wire\core\Wire.php(271): call_user_func_array(Array, Array) #3 C:\xampp\htdocs\projects\chemik\www\wire\core\Wire.php(229): Wire->runHooks('addProductToCar...', Array) #4 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(42): Wire->__call('addProductToCar...', Array) #5 C:\xampp\htdocs\projects\chemik\www\site\modules\apeisa-Shop-for-ProcessWire-6a482d9\ShoppingCart.module(42): ShoppingCa Cheers Had the Same Problem If still there for me worked to change in the ShoppingCart.module from total_sum = $total_sum to total_sum = '$total_sum' // Update cart to db or insert new row if there isn't $update = $this->db->query("INSERT INTO {$this->className} SET items = '$items', total_sum = '$total_sum', session_id = '".$this->getSession() ."'ON DUPLICATE KEY UPDATE items = '$items', total_sum = '$total_sum'"); and $update = $this->db->query("UPDATE {$this->className} SET items = '$items', total_sum = '$total_sum' WHERE session_id = '" . $this->getSession() . "'"); EDIT !!! So i found a better way and the real problem I think. This Error comes if you dont use the Standart Location. Based on the Module in /wire/modules/LanguageSupport/LanguageSupport.module on line wire('config')->dateFormat = $this->_('Y-m-d H:i:s'); // Sortable date format used in the admin $locale = $this->_('C'); // Value to pass to PHP's setlocale(LC_ALL, 'value') function when initializing this language // Default is 'C'. Specify '0' to skip the setlocale() call (and carry on system default). if($locale != '0') setlocale(LC_ALL, $locale); I had the problem that my float field was always with an comma " , " set. If you put the brackets like my first idea total_sum = '$total_sum' you will have trouble later with the PayPal module for examle. So i have set the setLocale(LC_NUMERIC, 'C'); every time if I use float. ShoppingCart.module setLocale(LC_NUMERIC, 'C'); // Update cart to db or insert new row if there isn't $update = $this->db->query("INSERT INTO {$this->className} SET items = '$items', total_sum = $total_sum, session_id = '".$this->getSession() ."'ON DUPLICATE KEY UPDATE items = '$items', total_sum = $total_sum"); // var_dump($total_sum); exit; return true; and $total_sum = $this->getTotalSumFromItems($items); $items = json_encode($items); setLocale(LC_NUMERIC, 'C'); $update = $this->db->query("UPDATE {$this->className} SET items = '$items', total_sum = $total_sum WHERE session_id = '" . $this->getSession() . "'"); return $items; and It work for me. I dont think its the best way but for me it works currently. Greetz Link to comment Share on other sites More sharing options...
DaveP Posted November 13, 2014 Share Posted November 13, 2014 I can confirm that videokid's error does exist and can be reliably triggered by judicious use of the browser's <Back> button. Link to comment Share on other sites More sharing options...
devonic Posted November 13, 2014 Share Posted November 13, 2014 Hello I've been using pw happily for about 6 months and really appreciate the support I have dipped into on the forums. (Hopefully I will be able to reciprocate when I have more experience). To-date I haven't needed to bother anyone with questions which have already been answered elewhere, but I suspect this would change if I implemented a shopping cart. I have a client who requires a website on which she can sell her quilting designs as pdf downloads, receiving payments via Paypal. She already has books published on the topic and selling internationally, so this is an important step for her into publishing on the web. Compared to what I've read about the demands placed on e-commerce solutions it shouldn't be too complicated, so I would be interested to know whether the current version of shop-for-processwire could take me there? Any advice gratefully received 1 Link to comment Share on other sites More sharing options...
pwFoo Posted November 28, 2014 Share Posted November 28, 2014 A online demo would be great. Or a screencast to take a look at admin and frontend? I needa shop in the (near) future and would love a PW solution Sorry for poor communications from my part. New shop module is currently in closed beta testing. I am pretty busy at the moment (both work and personal), so there is not too much focus on this. For the pricing I am thinking something like 50€ - 99€ for single site license. Also currently (slowly) building full featured shop profile, that would be single purchase and free to use parts or fully as many times as wanted (single site license required for all new shops though). Link to comment Share on other sites More sharing options...
Claus Posted November 30, 2014 Share Posted November 30, 2014 Sorry for poor communications from my part. New shop module is currently in closed beta testing. I am pretty busy at the moment (both work and personal), so there is not too much focus on this. For the pricing I am thinking something like 50€ - 99€ for single site license. Also currently (slowly) building full featured shop profile, that would be single purchase and free to use parts or fully as many times as wanted (single site license required for all new shops though). I would be very interested in this module. Currently fiddling with the existing ShoppingCart, but there is a lot of features I need to build on top of it (invoice generation, license agreement generation, taxes, VAT lookup, emailing and so on). Link to comment Share on other sites More sharing options...
iNoize Posted December 2, 2014 Share Posted December 2, 2014 Sorry for poor communications from my part. New shop module is currently in closed beta testing. I am pretty busy at the moment (both work and personal), so there is not too much focus on this. For the pricing I am thinking something like 50€ - 99€ for single site license. Also currently (slowly) building full featured shop profile, that would be single purchase and free to use parts or fully as many times as wanted (single site license required for all new shops though). Its possible to test the module ? Or to see a demo or something ? When do you thing it could be online ? 1 Link to comment Share on other sites More sharing options...
dazzyweb Posted December 2, 2014 Share Posted December 2, 2014 Judging by the lack of response from apesia here it appears that he wants to be left alone as far as this module goes at the moment. Maybe best for us to let off with the pressure as I am sure he will surprise us with an update when he is ready. 2 Link to comment Share on other sites More sharing options...
apeisa Posted December 2, 2014 Share Posted December 2, 2014 No worries guys, sorry I haven't keep you updated. It's been busy here with other things, so no new progress on this. I think it will take winter (or next summer...) holidays for me to get back to this. Maybe I release early bird release of what I have now... I have been hesitating with that because I know I can't provide any real support. 4 Link to comment Share on other sites More sharing options...
dazzyweb Posted December 2, 2014 Share Posted December 2, 2014 No worries guys, sorry I haven't keep you updated. It's been busy here with other things, so no new progress on this. I think it will take winter (or next summer...) holidays for me to get back to this. Maybe I release early bird release of what I have now... I have been hesitating with that because I know I can't provide any real support. I am sure others would be willing to contribute to this project/module if you released it and would be happy with that dependent in which form you want to release it(closed or open project). Not sure if you know but there was a discussion here about putting together an active “Shop Development Group” if you would be open to something like that. If you release early bird, I promise not to ask support from you. 2 Link to comment Share on other sites More sharing options...
hdesigns Posted December 3, 2014 Share Posted December 3, 2014 I would be willing to contribute to the project within the next 3 months because it seems like I will have plenty of free time during this period. The other question is if you're willing to let others work on your project especially semi-experienced php developers like me. 2 Link to comment Share on other sites More sharing options...
iNoize Posted December 4, 2014 Share Posted December 4, 2014 I also promise untill you have time . There are many people like dazzyweb for asking questions . Some People use the current module here. Could maybe someone export an example profile with the Shop (Invoice, PayPal,Email notification ) ? I've seen 3 or 4 different versions. One in the Modules Repo. Modifications done by Soma and some modified files by Nicko. So it's for halfcoders like me confusing which one to use now ? I've tried to combine this examples for me but it won't really work. Link to comment Share on other sites More sharing options...
Claus Posted December 4, 2014 Share Posted December 4, 2014 For my part I can say that I have hired a developer to extend the existing ShoppingCart. Haven’t started yet, but it feels a bit silly to develop something that would quite possibly be included in the new shopping cart system. The developer I’ve taken on is very capable, so if you want to have his eyes on your new system let me know . 1 Link to comment Share on other sites More sharing options...
dazzyweb Posted December 7, 2014 Share Posted December 7, 2014 @claus In what way is your developer extending the existing shopping cart? 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