Jump to content

Gadgetto

Members
  • Content Count

    175
  • Joined

  • Last visited

  • Days Won

    6

Gadgetto last won the day on October 19

Gadgetto had the most liked content!

Community Reputation

202 Excellent

About Gadgetto

  • Rank
    Sr. Member
  • Birthday 10/05/1966

Contact Methods

  • Website URL
    http://www.bitego.com

Profile Information

  • Gender
    Male
  • Location
    Mattersburg / Austria

Recent Profile Visitors

653 profile views
  1. Thanks for the kind words! Snipcart has a lot of different discount features! Here is a cut out from my process module which should show what's possible: $this->discountsTypes = array( 'FixedAmount' => $this->_('Fixed amount deducted from order total'), 'Rate' => $this->_('Percentage rebate on order total'), 'AlternatePrice' => $this->_('Discount price provided by alternate price list'), 'Shipping' => $this->_('Discount on shipping'), 'FixedAmountOnItems' => $this->_('Fixed amount deducted on specified products'), 'RateOnItems' => $this->_('Rate deducted on specified products'), 'FixedAmountOnCategory' => $this->_('Fixed amount deducted on items of specified categories'), 'RateOnCategory' => $this->_('Rate deducted on products of specified categories'), 'GetFreeItems' => $this->_('Free products when customer buys specified quantity of product'), 'AmountOnSubscription' => $this->_('Fixed amount on subscription'), 'RateOnSubscription' => $this->_('Rate on subscription'), ); $this->discountsTriggers = array( 'Code' => $this->_('Enter discount code'), 'Product' => $this->_('Specific product added'), 'Total' => $this->_('Order reaches specific amount'), 'QuantityOfAProduct' => $this->_('Product added a number of times'), 'CartContainsOnlySpecifiedProducts' => $this->_('Cart only contains specified products'), 'CartContainsSomeSpecifiedProducts' => $this->_('Cart contains some of specified products'), 'CartContainsAtLeastAllSpecifiedProducts' => $this->_('Cart contains at least all specified products'), ); Yes, invoices can be downloaded in PDF format and the layout is customizable via the Snipcart dashboard!
  2. What I forgot to tell: Snipcart recently became even more interesting in terms of cost! Snipcart removed the Pro Pack bundle (70 USD/month) from their pricing. All Pro features will be available on Standard plan: Abandoned carts recovery Real-time shipping estimates Inventory management Custom email templates TaxCloud & TaxJar integrations
  3. UPDATE 2019-10-18 Some time has passed since the last update. But don't worry I've been working on it! A good back of time devoured the development of our new documentation platform. The new docs website can be found here: https://docs.bitego.com (of course it runs under ProcessWire) Most contents of existing projects are already imported. And I just started with the documentation for SnipWire. Of course development on SnipWire itself has been continued as well: the stability of the REST queries and their processing has been significantly improved the filter (search) functions for the list views (orders, customers, products) have been implemented. native ProcessWire pagination for list views has been implemented more snipcart fields have been added to the product definition several bugs have been fixed Next steps: finishing detail-views for Customers, Products and Orders development of a parallel process that continuously fetches data from Snipcart and makes it available as a local cache. (this should significantly minimize the waiting time for REST queries) implementation of Abandoned Carts Handling implementation of Refunds Handling Thats it for now! I also hope some of you will find the time and testing the current status. I would be very grateful for your feedback.
  4. Just stumbled across this older post and need to make an addition to @ryans post: You need to add: ... // make this to give MarkupPagerNav what it needs $a = new PageArray(); $a->setDuplicateChecking(false); // <-- add this line! ... just below the PageArray creation - otherwise this won't work, as you will always having only 1 item in the final PageArray.
  5. @NorbertH I'll contact you via PM!
  6. @bernhard & @wbmnfktr thanks guys for recommending me!
  7. I have the same problem. Tried to make strings translatable in module.info.php, but I get an error "__" is not a function. Do you mean "___" ...
  8. Hmm.. this feels a bit like a hack for me. And it doesn't work for sub-menu entries.
  9. @bernhard do you mean we can have different menu structure for admins and clients? This would be great!
  10. @kongondo initially suggested that I could also use URL segments and therefore the discussion. I'll stay with URL params which is OK in backend.
  11. Thanks for your infos guys! I'm probably still much too deadlocked from my MODX time. ProcessWire just makes things different and that's good!
  12. I didn't think I'd need to add executeRefresh(), executeReset(), executeThis(), executeThat(), ... methods. This would fragmentize the source of a module a lot. I thought it works like in frontend, where I can enable URL segments and then the parts of URL paths like /mymodule/this/that/ are simply assigned to urlSegement(1) = "this" ,urlSegement(2) = "that". And the request wouldn't be routed to /mymodule/this/that/ but /mymodule/. From this point of view, I don't see any advantage for using url segments in process modules. It could also be that I still don't understand how URL segments are working!? (which is probably the case)
  13. Hi @draganI don't have an ___executeRefresh() method. And as I read in the old thread you posted, it strengthens my view that url segments are not ideal for my purpose.
  14. Yep, the button URL leads to a 404 Process returned no content. But it should resolve the execute method.
  15. Here is the init() and ___execute() part of ProcessSnipWire: (please have a look at the "Refresh" button down below - at the end of source code) /** * Initialize the module. * (Called before any execute functions) * */ public function init() { parent::init(); // Get SnipWire module config. // (Holds merged data from DB and default config. // This works because of using the ModuleConfig class) $this->snipwireConfig = $this->wire('modules')->get('SnipWire'); // Get activated $currencies from SnipWire module config $this->currencies = $this->snipwireConfig->currencies; $this->snipWireRootUrl = rtrim($this->wire('pages')->get('snipwire')->url, '/') . '/'; $this->currentUrl = rtrim($this->wire('input')->url, '/') . '/'; } /** * The SnipWire Dashboard page. * * @return page markup * */ public function ___execute() { $modules = $this->wire('modules'); $user = $this->wire('user'); $config = $this->wire('config'); $input = $this->wire('input'); $sniprest = $this->wire('sniprest'); $this->browserTitle($this->_('SnipWire Dashboard')); $this->headline($this->_('SnipWire Dashboard')); if (!$user->hasPermission('snipwire-dashboard')) { $this->error($this->_('You dont have permisson to use the SnipWire Dashboard - please contact your admin!')); return ''; } $this->_includeAssets( self::assetsIncludeDaterangePicker | self::assetsIncludeCurrencyPicker | self::assetsIncludeApexCharts ); $startDate = $this->_getStartDate(); $endDate = $this->_getEndDate(); $currency = $this->_getCurrency(); $action = $this->_getInputAction(); $forceRefresh = false; if ($action == 'refresh') { $this->message(SnipREST::getMessagesText('cache_refreshed')); $forceRefresh = true; } elseif ($action == 'reset') { $this->message($this->_('Store performance date range set to default.')); $this->_resetDateRange(); } $packages = $sniprest->getDashboardData( "$startDate 00:00:00", "$endDate 23:59:59", $currency, SnipREST::cacheExpireDefault, $forceRefresh ); $dashboard = $this->_prepareDashboardData($packages); unset($packages); if (!$dashboard) { $out = '<div class="dashboard-empty">' . $this->_('Dashboard data could not be fetched') . '</div>'; return $this->_wrapDashboardOutput($out); } $out = $this->_buildDashboardFilter($startDate, $endDate, $currency); $out .= $this->_renderPerformanceBoxes( $dashboard[SnipRest::resourcePathDataPerformance], $currency ); $chart = $this->_renderChart( $dashboard[SnipRest::resourcePathDataOrdersSales], $dashboard[SnipRest::resourcePathDataOrdersCount], $currency ); /** @var InputfieldForm $wrapper */ $wrapper = $modules->get('InputfieldForm'); /** @var InputfieldMarkup $f */ $f = $modules->get('InputfieldMarkup'); $f->label = $this->_('Performance Chart'); $f->icon = 'bar-chart'; $f->value = $chart; $f->columnWidth = 100; $f->collapsed = Inputfield::collapsedNever; $wrapper->add($f); $out .= $wrapper->render(); /** @var InputfieldForm $wrapper */ $wrapper = $modules->get('InputfieldForm'); /** @var InputfieldMarkup $f */ $f = $modules->get('InputfieldMarkup'); $f->label = $this->_('Top Customers'); $f->icon = self::iconCustomer; $f->value = $this->_renderTableTopCustomers($dashboard[SnipRest::resourcePathCustomers]); $f->columnWidth = 50; $f->collapsed = Inputfield::collapsedNever; $wrapper->add($f); /** @var InputfieldMarkup $f */ $f = $modules->get('InputfieldMarkup'); $f->label = $this->_('Top Products'); $f->icon = self::iconProduct; $f->value = $this->_renderTableTopProducts($dashboard[SnipRest::resourcePathProducts], $currency); $f->columnWidth = 50; $f->collapsed = Inputfield::collapsedNever; $wrapper->add($f); $out .= $wrapper->render(); /** @var InputfieldForm $wrapper */ $wrapper = $modules->get('InputfieldForm'); /** @var InputfieldMarkup $f */ $f = $modules->get('InputfieldMarkup'); $f->label = $this->_('Recent Orders'); $f->icon = self::iconOrder; $f->value = $this->_renderTableRecentOrders($dashboard[SnipRest::resourcePathOrders]); $f->columnWidth = 100; $f->collapsed = Inputfield::collapsedNever; $wrapper->add($f); $out .= $wrapper->render(); /** @var InputfieldButton $btn */ $btn = $modules->get('InputfieldButton'); $btn->id = 'refresh-data'; //$btn->href = $this->currentUrl . '?action=refresh'; $btn->href = $this->currentUrl . 'refresh'; // <--- https://processwire.moduledev/pw/setup/snipwire/refresh // and leads to "The process returned no content." $btn->value = $this->_('Refresh'); $btn->icon = 'refresh'; /* $btn->addActionLink( $this->currentUrl . '?action=refresh_all', 'Refresh Complete Snipcart Cache', 'refresh' ); */ $btn->showInHeader(); $out .= $btn->render(); return $this->_wrapDashboardOutput($out); }
×
×
  • Create New...