Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

20 Excellent

About tuxy

  • Rank
    Jr. Member
  • Birthday 02/13/1972

Profile Information

  • Gender
  • Location
    Adinkerke, Belgium

Recent Profile Visitors

1,880 profile views
  1. Ok, I try the PaymentExample.module This renders the order details in a variable '$out' 1. I don't want display it at the PaymentExample.module, only mail this order details. How can I do this? <?php require_once(dirname(__FILE__) . '/PaymentAbstract.php'); class PaymentExample extends PaymentAbstract { public static function getModuleInfo() { return array( 'title' => 'Betaalmogelijkheden', 'version' => 001, 'summary' => 'Betaalmogelijkheden', 'singular' => false, 'autoload' => false ); } public function init() { $this->title = $this->_("Bancontact"); } /* * * returns nothing. You should edit and save $order page. If payment was succesful, * then do $order->removeStatus(Page::statusUnpublished) and remember to save the order! * * If order was also paid, then do $order->sc_paid = time(); * * If order was not paid, but it was succesful (like invoice, money on delivery etc) * then just publish the order, but do not set sc_paid value. * * After you have manipulated the order, then just to redirect to $this->completedUrl * * * @param Page $order keeps the page object for the order * */ public function processPayment(Page $order) { if ($this->input->get->ok) { if ($this->input->get->ok == 'fail') { // We don't remove statusUnpublished. That means failed or cancelled payment $this->session->redirect($this->completedUrl); } if ($this->input->get->ok == 'paid') { $order->setOutputFormatting(false); $order->sc_paid = time(); } $order->removeStatus(Page::statusUnpublished); $order->save(); $this->session->redirect($this->completedUrl); } // No need to really do anything like this on payment module, this is here just for educational purposes): $out = "<h2>Products ordered</h2>"; $out .= "<ul>"; // Products foreach($order->children('check_access=0') as $p) { $out .= "<li><strong>{$p->title}</strong> {$p->sc_price}€ x {$p->sc_qty} (total: ". $p->sc_qty * $p->sc_price ."€)</li>"; } $out .= "</ul>"; $out .= "<h2>Shipping details</h2>"; $out .= "<ul>"; $out .= "<li>First name: $order->sc_firstname</li>"; $out .= "<li>Last name: $order->sc_lastname</li>"; $out .= "<li>Email: $order->email</li>"; $out .= "<li>Street address: $order->sc_streetaddress</li>"; $out .= "<li>Zip: $order->sc_zip</li>"; $out .= "<li>City: $order->sc_city</li>"; $out .= "<li>Country: $order->sc_country</li>"; $out .= "<li>Username: {$order->sc_customer->name}</li>"; $out .= "<li>Email address from user: {$order->sc_customer->email}</li>"; $out .= "</ul>"; $out .= "<h2>Other interesting stuff</h2>"; $out .= "<ul>"; $out .= "<li>Current url: {$this->currentUrl}</li>"; $out .= "<li>Completed url: {$this->completedUrl}</li>"; $out .= "</ul>"; // Usually we would use some payment api or send people to 3rd party service like paypal // and process their reply $out .= "<h3>How do we proceed?</h3>"; $out .= "<ul><li><a href='./?ok=invoice'>Send me an invoice</a>"; $out .= "<li><a href='./?ok=paid'>I pay this with Magic Money™</a>"; $out .= "<li><a href='./?ok=fail'>I want to fail this payment</a>"; return $out; } } PS: When I rename this module by example: PaymentVisa.module then it is disappeared from the payment options menu in the checkout Christophe
  2. Hello, I try find a solution how can, after click 'Place your order' the customer received an email with the order details. For testing i'm trying adding some code like this in the PaymentInvoice.module: ... $pay = $modules->get("ShoppingCheckout")->renderConfirmation(); echo $pay; ... (If this solved, I putting the variable '$pay' in a mail()-function.) But this gives a server error. What do I wrong I spent hours, but with no luck Who can help me find a solution for this??? Christophe
  3. Hello, I installed the Shop-module with succes. Now studying how the checkout-module works. But I have no experience how customizing a module. What I will try to make: 1. If a customer click on [Place your order] then the customer received a confirmation-mail with all the order-details (product-list and his own contact-info) similar that renders in the checkout-page. I find on line 221 public function renderConfirmation() , but I don't know how find/filter the 'order' data. How can I implement a mail() function in the checkout-module? What variables/functions render the order details that I can integrated in the mail-function? Hope that someone can help me Christophe
  4. Nice, beautiful and mobile friendly. I like it
  5. Hi guys, I'm impressed with all this information I'm very happy with this! The project is not for now it is for this summer! But I have an idea how can started, and have a few questions to ask the fitnesscoach about sorting, etc. PS: I can not enough saying that your very helpful people and I think this make the PW community very strong and popular! I very very very happy I find PW when I searching for the best CMS A happy (junior) PW-user, Christophe
  6. Ok, a stupid question: if I can follow: if the user logged in, then the program-page (template) is showing related with the user? Not the standard user-page (user-template)? Thanks for the snippet-examples LostKobrakai I learning best with this!
  7. Ok, I try understand what you mean, but it's not so easy whithout example/code-snippet how realise that. If I can follow you, then added a reference-link-field to the selected videos in the user-template? Fitness Program Project: 1.The first step is uploading ALL the videos. -Videos --Video1 --Video2 ... 2. The coach adding users -Users --User1 --User2 3. The coach selected the videos for each user/client (personal fitness program) ... (I made my first PW project with success (www.springbeestjes.be) and now understanding the basics, but there is a lot more that I want to learning for building great PW sites!) Christophe Yes, that would be nice, and very flexible
  8. tuxy

    My first PW site

    Thank you @pwired I'm a webdeveloper-hobbyist and have many years working with Drupal and in the beginning of the internet i'm interesting in html etc. I'm not a hardcore programmer, but studying myself PHP, HTML, CSS, jQuery, SASS, ... I looking to Open Cart and it like a really nice system. I give this a try, thank you for the info Christophe
  9. But... I think it's better make a new page 'My personal fitness program' / user? Or is it better edit the system template? @mr-fan, This what the coach want: Point 2: should the admin set the videos for the user
  10. Ok, Hiiiii, Thats nice! system templates are new for me This gives me a lot of possibilities. Client x can see 6 videos. Cleint y can see 15 videos. It is different / client. Hmm, i look in the next days to the custom module. thx for the tip! I'm very motivated start this project, with this uselful information. Thank you guys If you has more useful tips, i follow this topic Christophe
  11. Continued... I find this usefull site: http://blog.4digits.net/getting-started-with-processwire/ Here you see the error when I restart apache: For testing I installed a clean PW profile. When i follow the steps on this site , it gives the same errors. Maybe a stupid question: how can I give permissions on a file that only existing at the end of the installation process: chmod 666 site/config.php Christophe
  12. Hello, I upload a PW site to my local server (Raspberry Pi). When i type: The home-page showing fine, but the other subpages gives a 404 error. I searching the whole forum, but no solution Adding random stuff "krbnvhghht" in the top of the .htaccess file Manipulating (uncomment): RewriteBase /springbeestjes/ or RewriteBase / or RewriteBase / or ... edit the apache2.conf file and adding: ... # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess AllowOverride All ... This gives an error when restart apache (not in the browser!) I adding several sites in subdirs on my local server without problems. /var/www/site1/ /var/www/site2/ .... Then i type in the browser: ... The PW-site don't show the sub-pages I'm seeing in phpinfo that mod_rewrite not loaded, then manually loading mod_rewrite and edit again apache2.conf, without success I made a screenshot from phpinfo. Maybe this helps to find a solution. All help is welcome Regards, Christophe
  13. tuxy

    My first PW site

    Hey ESRCH, Thanks for the tip! Foxy Cart is not free Regards, Christophe
  14. user template? you mean the profile-page?
  15. Hi ESRCH! Wauw! Lots of information! Yes, the start of a project is very special with PW, it is the foundation of the whole project! For now I have a lot of time for developing this project (deadline is end of the summer!), but i want preparations and searching for good solutions. In this forum are the experts with PW, and some advice how to start this project is welcome. I like your information, gives me a lot of hope how to start this project, and for myself it is a good way learning PW Grtz, Christophe
  • Create New...