Jump to content

Gadgetto

Members
  • Content Count

    363
  • Joined

  • Last visited

  • Days Won

    12

Gadgetto last won the day on March 25

Gadgetto had the most liked content!

Community Reputation

386 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

1,093 profile views
  1. UPDATE 2020-07-03 SnipWire 0.8.7 (beta) released! This update fixes some small bugs and adds an indicator for TEST mode: Added ProcessWire notice to flag SnipWire TEST mode Updated exchangerates API to handle unsupported currencies All modules and class files are now using ProcessWire's classLoader Fixed badges display when no refunds possible (in order details - refunds form) Fixed a page select problem with custom cart fields
  2. This is not yet implemented, sorry. But it’s on my list and it will be the next feature to be added.
  3. This is possible by using SnipWires built in hookable event handler methods! All hookable event handler methods will return an array containing payload Snipcart sent to your endpoint. An "order completed" event also holds the detailed customers data, which can be used to generate/update a PW user. How to use the hookable event handler methods (sample): $webhooks->addHookAfter('handleOrderCompleted', function($event) { $payload = $event->return; $userRaw = $payload['user']; // <-- will hold the neccessary data for creating a PW user // ... your code here ... }); PLEASE NOTE: those hooks will currently only work when placed in init.php or init() or ready() module methods! Here is a full sample of a payload content you will get when an order is completed (look at the "user" part!):
  4. If you have higher volumes of sales Snipcart offers special prices. Just contact them. They are very flexible!
  5. Sorry for my bad English! I meant - this is on my todo list! It will definitely be implemented. The full cart system is JavaScript based - so it should be all possible what's possible with JS.
  6. The easiest way is to use SnipWire: https://modules.processwire.com/modules/snip-wire/ Product variations is one of the open points in my module SnipWire. It's fully customizable - just see how this works here: https://docs.snipcart.com/v2/getting-started/customization It's easy by using the hookable webhook methods of SnipWire module! Snipcart validates an order's integrity, by using the values specified in the data-item-url attribute of each product. If you submit an order, Snipcart crawls your website and compares the submitted values with the stored values of the products. It's impossible to manipulate an order.
  7. SnipWire provides sample templates to demonstrate how shop products could be rendered and is only thought as a starting point. Using the "Regular" site profile for displaying shop products within blog categories would not make sense as the blog articles are formatted very differently. You would need to write your own category template for listing shop products within categories.
  8. The stated library has a MIT license so this should not be a problem. As the library has no external dependencies I'm only using the content of the "src" folder within my module. I copied it manually into "/vendor/vat". This works like a charm: wire('classLoader')->addNamespace('Ibericode\Vat', __DIR__ . '/vendor/vat'); use Ibericode\Vat\Rates; ... $cachePath = $this->wire('config')->paths->cache . 'vat-rates.txt'; $rates = new Rates($cachePath); $rate = $rates->getRateForCountry('NL'); // 21 bd($rate); Edit: I finally copied over the full library including LICENSE and so on.
  9. I'd like to use the following PHP library within my module: https://github.com/ibericode/vat I have a "vendor" folder within my module's file structure where I'd like to place the library. How can this be achieved using the WireClassLoader methods? Would this work: wire('classLoader')->addNamespace('Ibericode\Vat', __DIR__ . '/vendor/vat'); use Ibericode\Vat; I don't understand how all the Ibericode\vat subclasses are loaded.
  10. I see you put TrelloWire within the namespace of ProcessWire. Is there any benefit or is that just a matter of taste?
  11. If I understand this correctly: the classLoader is loading classes via spl_autoload_register with addNamespace you tell the classLoader which classes to load (properties: namespace + path to the class files) this makes manually including of all class files from a specific folder obsolete What I don't understand: wire('classLoader')->addNamespace('SnipWire\Helpers', dirname(__DIR__) . '/helpers'); Would this preload all class files from within the /helpers directory? I still don't get the real purpose. This is probably as I also don't exactly know how the composer autoloader works...
  12. This would compile the file for PW 3.x or not? (seems to be an older project)
  13. I've read the API docs for classLoader, but this didn't help. No explanation, no sample code ...
×
×
  • Create New...