Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Gadgetto

  1. Which min. required PHP version would be OK for you? How many of you are still running your servers with PHP < 7.4?
  2. With the next SnipWire release I plan to support only V3 of the Snipcart engine. Supporting both versions would be too much effort. How do you think about this?
  3. Hello, two days ago I filed a issue on GitHub regarding a problem I encountered while using TinyMCE, where TinyMCE field keeps modifying HTML markup which is pasted via code editor (code plugin) after saving the page a second time. The issue can be found here: https://github.com/processwire/processwire-issues/issues/1751 Could someone please confirm if this is a bug in the TinyMCE field or just me having the problem? Thanks, Martin
  4. Is there another way to render a menu (based on the pages tree) without fetching an array of pages?
  5. @BrendonKozthanks for your hint! Prepending the page even seems to be a bit more performant. Regarding the MySQL timeout - it was another problem which I could fix in the meantime.
  6. Hello, I'm just trying to run this simple pages selector but it always leads to a DB timeout: $homePage = $pages->get('/'); // <-- this part works $sectionPages = $homePage->and($homePage->children()); // <-- leads to MySQL timeout // this also works (but then of course the home page is missing in the PageArray) $sectionPages = $homePage->children(); I'd like to select the visible tree parts of this: This is the full error message: [31-May-2023 21:49:52 Europe/Vienna] PHP Fatal error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wwwroot/wire/core/WireDatabasePDOStatement.php line 168) #0 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/WireDatabasePDOStatement.php(168): PDOStatement->execute(NULL) #1 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/WireDatabasePDOStatement.php(148): ProcessWire\WireDatabasePDOStatement->executeDebug(NULL) #2 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/WireDatabasePDO.php(936): ProcessWire\WireDatabasePDOStatement->execute() #3 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/PagesLoader.php(1309): ProcessWire\WireDatabasePDO->execute(Object(ProcessWire\WireDatabasePDOStatement)) #4 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/Pages.php(1193): ProcessWire\PagesLoader->getById(Array, Object(ProcessWire\Template), 29) #5 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/PagesType.php(397): ProcessWire\Pages->getById(Array, Array) #6 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/Users.php(77): ProcessWire\PagesType->get(41) #7 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/Session.php(210): ProcessWire\Users->get(41) #8 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/ProcessWire.php(601): ProcessWire\Session->__construct(Object(ProcessWire\ProcessWire)) #9 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/wire/core/ProcessWire.php(315): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #10 /Users/mgartner/ProjekteWEB/bitego_2023/wwwroot/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #11 {main} in /wwwroot/index.php on line 64 I'm using: ProcessWire 3.0.218 dev PHP 8.1.13 MySQL 5.7.39 the Database format is InnoDB What could be wrong here?? Greetings, Martin
  7. Sorry, no German translation available. I'm planning to put the language package on Crowdin - but I need to figure out the best way to do this under ProcessWire. In MODX for example, all language strings are collected in single files... Edit: It seems since PW 3.0.181 it is possible to ship your modules with additional translation files inside a languages folder!
  8. Hey guys, I'm indeed starting further development on this module in the next days! It needs a lot of work to be done. The main part will be the transition to Snipcart 3.0 engine + a robust EU VAT tax integration. As usual I'll report the progress to this thread. Please stay tuned! Greetings, Martin
  9. @Robin Ssorry, the behavior I described is only true when using InputfieldButton. InputfieldSubmit has no surrounding <a></a> tags. Your hint only works with InputfieldSubmit.
  10. This doesn't work as expected because it only disables the <button> element. But ProcessWire embeds the <button> element within an <a> tag and a click will follow the href nevertheless. Additionally the button element doesn't look disabled... I think InputfieldSubmit and it's siblings renders a strange kind of html. <button> within <a></a> is not valid HTML5 and could lead to unexpected behavior. I already filed an issue on GitHub but Ryan told its intended an can't be changed.
  11. If you only need/want to render the Snipcart anchors/buttons then you could do it by simply using php and ProcessWire output (but for example handling VAT splitting and multi currency will be another thing). For all other things I listed above, SnipWire will do the job for you.
  12. SnipWire integrates the Snipcart dashboard into your ProcessWire backend SnipWire installs all necessary fields for setting up your products editor (> 22 different fields) it automatically generates the necessary Snipcart anchor markup based on those fields SnipWire provides an easy way to integrate the Snipcart shopping cart into your project (including cart button, customer profile, login, logout, ...) provides sample templates to setup your online shop. handles and calculates all of the different VAT handlings worldwide handles multi currency process refunds right from your ProcessWire back-end process abandoned carts and send messages to customers right from the ProcessWire back-end provides hookable ProcessWire events for orders, customer registration, ... ... How would you handle the custom data attributes markup without an engine generating it? If you only have a handful products this might be possible by writing the markup by hand but if your client should be able to manage a shop, SnipWire is the best way to do it. As a sample - how would you do this manually? <button class="snipcart-add-item uk-button uk-button-primary" title="Add to cart" aria-label="Add item to cart" data-item-name="Festish Wet Warmer" data-item-id="1713" data-item-price='{"usd":"22.20","eur":"19.90"}' data-item-url="http://domain.com/snipcart-shop/festish-wet-warmer/" data-item-description="A short product description..." data-item-image="http://domain.com/site/assets/files/1713/beer2.65x65-hidpi.jpg" data-item-categories="Beer" data-item-metadata='{"id":1713,"created":1563363120,"modified":1580402487,"published":1563363120,"created_users_id":41,"modified_users_id":41}' data-item-quantity="1" data-item-quantity-step="1" data-item-stackable="true" data-item-taxable="true" data-item-taxes="10% VAT" data-item-has-taxes-included="true" data-item-shippable="true"> <span uk-icon="icon: cart"></span> Add to cart </button> I probably don’t get your message, but as an experienced developer you should get the benefit.
  13. @Ben Sayers: Hey Ben, that's what I meant - simply including _uikit.php won't do the job. The whole templates are built using UIKit CSS framework. You'll need to write your own templates for product overview and product-details. If you have a look at the two sample templates which are installed by SnipWire installer, you will see how it works. Please have a look at the comments in the php files. I currently don't have the time to write sample code based on your rendering method. But if you are familiar with ProcessWire development this should be an easy job. Having a look at the snipcart-shop template, all in all, that's all you need: (please note this is a quick composition of the required code and might not fully work. And you need to use your own CSS classes based on your framework) <!-- The content element holds your products catalogue. --> <div id="content"> <?php $products = page()->children('limit=9'); echo productOverview($products); ?> </div> <?php /** * Render a shop product overview * * @param PageArray $products * @return string * */ function productOverview(PageArray $products) { if (!$products->count) return ''; $out = '<div class="product>'; foreach ($products as $product) { // We use the first image in snipcart_item_image field for demo $imageMedia = ''; if ($image = $product->snipcart_item_image->first()) { $productImageMedium = $image->size(600, 0, array('quality' => 70)); $imageDesc = $productImageMedium->description ? $productImageMedium->description : $product->title; $imageMedia = '<img src="' . $productImageMedium->url . '" alt="' . $imageDesc . '">'; } else { $imageMedia = '<div title="' . __('No product image available') . '">' . ukIcon('image', array('ratio' => 3)) . // you need to use your own image output function here because ukIcon is based on UIKit CSS '</div>'; } // This is the part where we render the Snipcart anchor (buy button) // with all data-item-* attributes required by Snipcart. // The anchor method is provided by MarkupSnipWire module and can be called // via custom API variable: $snipwire->anchor() $options = array( 'label' => ukIcon('cart'), // use your own image output function 'class' => 'button button-primary', 'attr' => array('aria-label' => __('Add item to cart')), ); $anchor = wire('snipwire')->anchor($product, $options); // Get the formatted product price. // The getProductPriceFormatted method is provided by MarkupSnipWire module and can be called // via custom API variable: $snipwire->getProductPriceFormatted() $priceFormatted = wire('snipwire')->getProductPriceFormatted($product); $out .= '<a href="' . $product->url . '">' . '<div class="product-detail">' . '<div class="media-top">' . $imageMedia . '</div>' . '<div class="card-body">' . '<h3 class="card-title">' . $product->title . '</h3>' . '<p>' . $product->snipcart_item_description . '</p>' . '</div>' . '<div class="card-footer">' . $anchor . '<span class="align-right text-primary">' . $priceFormatted . '</span>' . '</div>' . '</div>' . '</a>'; } $out .= '</div>'; return $out; } ?>
  14. You'll need to have a look at the snipcart-shop and snip cart-product templates and modify them so they use the preferred rendering method.
  15. Thanks for jumping in @Jan Romero! This will work but can have side effects.
  16. Compared to v2, there is still one feature missing in v3 of Snipcart: Recurring subscriptions As soon as v3 is feature complete I'll starting development on v3 support.
  17. Hi @Jozsef Snipcart is definitely not for everyone. We use it for customers who need to launch their store very fast and don't have a lot of products. Are you sure that other free/open source solutions are really free? We have developed some e-commerces sites in the past and the cost of setup and integration of those open source shop systems are very high. And 3 out of 5 shop systems we tested had huge problems when it comes to rounding. Fixing these things cost $$$. This quickly puts the cost of the Snipcart system into perspective. Snipcart is a very stable system and you don't have to bother with those things as it simply works.
  18. This is not yet supported by SnipWire directly. I first need to create a special field type which offers alternate price list creation. This feature is already on my todo list!
  19. No problem. Snipcart’s behavior is a little bit weird in some places. I’ll need to add some hints in module settings to make it more clear.
  20. The PayPal gateway view is correct! If you use PayPal you won't get a credit card form on Snipcart checkout.
  21. Sorry, I don't know why it's not working for you. I can't reproduce this problem. I tried it in 2 different installations and it works like expected. As I understand, it works in Test environment and when you switch to Live in Snipcart it doesn't!? Did you check all settings on Snipcart side? Which payment gateway did you configure in Snipcart?
  22. @fruid Hi, could you please provide more infos? Which PW version, which PHP version? Which SnipWire version? There is no SnipWire v3 or v2. The latest version is 0.8.7. If you mean the Snipcart version 3 - then it's not supported yet.
  23. SnipWire will support Snipcart API V3 when it’s feature complete. There are only a few left so I think it wont last long until we can start migrating SnipWire to API V3. Currently missing features: Recurring subscriptions Discounts by an alternate price list Custom validation
  • Create New...