Jump to content


  • Posts

  • Joined

  • Last visited

About sarah_hue

  • Birthday 02/06/1981

Profile Information

  • Gender
    Not Telling
  • Location
    Cologne, Germany

Recent Profile Visitors

2,493 profile views

sarah_hue's Achievements

Jr. Member

Jr. Member (3/6)



  1. Copied everything to a separate webserver. Uploading files, deleting them and changing their description works fine here. Anything you could suggest instead of deinstall and reinstall the VersionControl module?
  2. Well, instead of counting the number of free seats every time a tour page is viewed, I would recalculate the number of free seats (and update the field) once a new booking is made. But maybe that's exactly what you were planning to do and I just misunderstood it.
  3. Jon, indeed the easiest way would be a field (i.e. 'free_seats') on each tour page (= child page of a tour date). Then you would use something like: public function calculateFreeSeats(Page $tour, $order) { if ($tour->free_seats) { $tour->setOutputFormatting(false); $tour->free_seats = ($tour->free_seats - $order->seats); $tour->save(); } }
  4. sarah_hue

    von Bergh

    With everybody else discussing performance: I like the one-page construction very much, and when it comes to neat little details like the imprint fly-in animation the design really convinces me. (Though I'm usually not a fan of one-page-sites!) The many, many references are clearly arranged and especially the different categories of references are beautifully implemented. Well done, Andreas! The only obstacle I found was the long way I needed to scroll down once I clicked on details of the very last references - since that flies me directly to the upper content area, with no link to get back to the end of the list. But this definitely is a minor observation, it doesn't bother me at all. And the performance is all right with me now, the whole page took 2,4 seconds to load on first try. Looks like your server changes paid off! (And caching options with ProcessWire are sweet.)
  5. Hi, wow, this is weird: I am running two sites with one ProcessWire installation. Both are using VersionControl module. I moved both sites to another webserver right after installing VersionControl. On site #1 ...sometimes (!) file upload is not possible (the pink status bar gets stuck at 100 %) already uploaded files (before moving to the new server) cannot be deleted file descriptions cannot be changed no error messages are given, not even in debug mode While on site #2 ...everything's fine: uploading, deleting, changing the description... I read Douglas' post on a glitch in dev 2.5.19, but I'm using the regular 2.5(.0). nghi's post on a similar problem describes pretty much what I'm experiencing here, but if there was something wrong in the suhosin.ini, site #2 would encounter the very same problem. If I use VersionControl to set the file field back to an earlier version where the file was not uploaded yet, the file disappears and is deleted from /assets/file/[page-id]/. Same vice-versa when setting to a version before a file was deleted: It is recreated on the page and in the filesystem. Permissions are -rw-rw-rw- for all files. Any ideas? Sarah
  6. This needs to be moved to the "modules" forum: It definitely is a shoppingCart problem. The complete database query is: INSERT INTO ShoppingCart SET items = '[{"product_id":3124,"qty":1}]', total_sum = 10,50, session_id = 'e3bc4bb75fa765aefc4695fa27820f1464f39fb3' ON DUPLICATE KEY UPDATE items = '[{"product_id":3124,"qty":1}]', total_sum = 10,50 From my point of view the problem seems to be the comma separated price used for the query. While the sc_price field contains "10.50" (with a dot as decimal mark), for unknown reasons a comma is used as a result for this query line ShoppingCart.module: // 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"); My module settings define a comma as decimal mark: Though this comma should not be used unless it is produced via $this->renderPrice($total_sum). No explanation/solution so far.
  7. Hi, hopefully you can give me some advice on debugging an error with a ProcessWire 2.5 site using ShoppingCart module (and Version Control module): When guest users try to add a specific product to the shopping cart, a "500 Internal Server Error" page is thrown and the following error is logged in assets/logs/errors.txt: 2015-05-25 18:28:06 guest 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 '01, session_id = 'd41a2726a1f1d8205f45ce240da65af10517c74f' ON DUPLICATE KEY UPD' at line 1 (in /var/www/pw/wire/core/Database.php line 114) Since only a part of the SQL error is shown, I have difficulties to find out what's wrong here. The error does only occur with two products (a hundred others are fine) and only with guest users. If I add these products as a logged in admin, everything works great. The database tables do not include a session ID d41a2726a1f1d8205f45ce240da65af10517c74f. How do I get a more specific error message from ProcessWire? Thanks Sarah
  8. Here's what I did as a workaround: I've got this page /books/the_jungle_book (template: book)and added a quasi duplicate of this page /pdfs/the_jungle_book (template: pdf) – containing only the necessary fields title, author, sc_price, sc_qty, with a 1:1 content copy of the fields in page /books/the_jungle_bookThen for the ShoppingCart "purchase" button, I use (in the template file books.php): // book $content .= $modules->get("ShoppingCart")->renderAddToCart()); // pdf $pdf = $pages->find('template=pdf,title='.$page->title)->first(); $content .= $modules->get("ShoppingCart")->renderAddToCart($pdf)); I know this is not elegant at all, but at least it works for now. Yes, I did write: "Since there will be many different pages with books, manually adding a second page for the printed book is not an option." Since the workaround requires to manually add both a 'book' and a 'pdf' page: How can I create the pdf page automatically once a user creates the book page?
  9. Hi, now I need your help getting an idea: I've got a page "The Jungle Book" containing details on the book by Rudyard Kipling. With ShoppingCart module, I'd like to offer the book both as a PDF for download as well as a printed version. I added the sc_price and sc_qty fields to the page, which is half of what I need: Now the page renders a button to put the book (let's say it's PDF version) into the shopping cart. How do I add a second version of this product on the same page? Titel, price and all the details will be the same, only the actual type of the product (digital version instead of printed version) differs. Since there will be many different pages with books, manually adding a second page for the printed book is not an option. Thanks for your ideas! sarah P.S.: There is this post by apeisa on adding different variations of a product into the shopping cart. But I haven't figured out what's a good way to refer back to the original page (for getting the product information) once a variation is placed in cart.
  10. Great, thanks a lot! Extra question: If I want to add "Name: " as extra text to the new combined field – how could I do this?
  11. Hi, I've got three fields in a template page: name surname full name (hidden field) Now I'd like "full name" to be a combination of "name" and "surname". There's no need to use javascript, since I only need the "full name" field later on for processing. Would be totally fine to populate "full name" once the page is saved. I don't have any experience with hooks, any hints how I could get the merging done? Thanks sarah
  12. Okay, got it: While the PaymentAbstract.php is in /ShoppingCart/, PaymentPaypal.module installs into a new folder /PaymentPaypal/ and cannot be installed when in /ShoppingCart/. So I just edited this line of /site/modules/PaymentPaypal/PaymentPaypal.module require_once(dirname(__FILE__) . '/PaymentAbstract.php'); into this: require_once(dirname(__FILE__) . '/../ShoppingCart/PaymentAbstract.php'); Now it's possible to install the paypal method and use it with ShoppingCheckout.
  13. Alright, now I get it. Though I can't manage to get the module running: I uninstalled everything except for shop-for-pw (ShoppingCart and ShoppingCheckout). When I try to install the old paypal method zip file, the admin page returns this error: Compile Error: require_once(): Failed opening required '/var/www/processwire/site/modules/PaymentPaypal/PaymentAbstract.php' (include_path='.:/usr/share/php:/usr/share/pear') (line 3 of /var/www/processwire/site/modules/PaymentPaypal/PaymentPaypal.module) So again I copied PaymentAbstract.php into /PaymentPaypal/, and again the error message changes to: Compile Error: Cannot redeclare class PaymentAbstract (line 3 of processwire/site/modules/ShoppingCart/PaymentAbstract.php)
  14. Hi apeisa, thanks for your reply! So what will I do to install the deprecated paypal module without getting the error message? Only install shop-for-pw (ShoppingCart and ShoppingCheckout) and the old paypal module? Right now I also have the PaymentModule installed as well. Sarah
  15. Oh well, I just read my last post again. Looks I got really confused with word beginnings and endings, that one doesn't really make sense. But somehow you got exactly what I wanted to say (and didn't manage to)! Excellent, thanks a lot!
  • Create New...