Jump to content

BenSlayers

Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by BenSlayers

  1. Hi I'm curious if there are any developers out there that have experience with SnipWire who might be available to hire? I already have the module installed and integrated with the client's Stripe account. This is a non-profit company that would like to offer 9 different membership plans. Everything is working for the basic plan but there are some advanced options that I'll need some assistance with. I've reached out to the developer and I had someone that was going to help but that didn't work out - I do have a description/overview of the project written out which I can forward to you in a DM. From what I understand, this shouldn't be too terribly difficult for an experienced programmer. Thank you! ?

  2. I can confirm @torf's comments above, this module doesn't work in it's current state. Some images are lager than others, it won't display in a nice grid no matter what options I try. Wish I would have looked here before I wasted a couple hours trying to figure out what I was doing wrong, lol. Sure would be a nice addition to my PW toolkit if it worked.

    • Like 1
  3. Hi @Gadgetto, I finally have a working demo (see it here) using the Beginner Profile that is incorporated with my custom design but I have a few questions:

    1. Where is the data saved for custom fields? I added some custom fields and completed a transaction but I don't see any of the custom field data saved anywhere in Setup -> SnipWire -> Customers or in my Snipcart account.
    2. Is there a hook I can use to replace the "Order Info" with "Member Info" in the tab label?
    3. I'm using SnipWire to sell Membership plans and I'm hoping to have them renew automatically using the subscription option, I don't see any information in your documentation on this, can you provide an example?
    4. Is there a way to set a default option on a select field in the Billing Address? This association is only for Michigan (US) so I'd like to set that as the default under the State/Province field.
    5. Is there a way to use conditional custom fields depending on the product that is selected? I'm hoping to be able to add/hide certain *required* & optional fields on the Order Info and Billing Address tabs as some membership plans are for businesses and others are for individuals. Each product will likely have custom requirements so if I can create some sort of if/else statement, that would be great.

    EDIT: Is there anyone out there that can help? All suggestions are welcome! ?

  4. 8 minutes ago, Gadgetto said:

    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)

    @Gadgetto thank you very much for taking your time to provide that example. I'll kick it around and see what I can do. Cheers ?

  5. 11 minutes ago, Jan Romero said:

    Should be a safe fix for that specific error.

    Yup, that worked. Thanks so much @Jan Romero! I can see the demo products now.

    2 minutes ago, Gadgetto said:

    This will work but can have side effects.

    Oh no! Hi @Gadgetto, can you elaborate on the side effects? Basically, I'm trying to add a way for this association to offer paid memberships. I initially tried doing this with @ryan's FormBuilder and Stripe Payment Processor modules but it quickly became too complex for that route. The association's board came up with 9 different membership plans they'd like to offer, some with one user, others with potentially hundreds or more. For instance, when a school registers, they'd like to be able to offer a coupon code to their students so they can register for free, using the school's plan that they paid for. I think the only way I can really make this work is using a cart system so I can enable coupon codes. If you're interested, I can PM you links to the mock-ups I've created that might help shed some light on what I'm trying to do.

  6. On 4/21/2020 at 11:22 AM, Gadgetto said:

    If you are using another profile or output strategy, you'll need to rewrite the template source.

    I'm using the Beginner profile, any chance I could convince one of you coding wizards to show me some example code for snipcart-product.php, snipcart-shop.php, and snipcart-cart.php? I'm definitely not a PHP expert but I'm feeling more and more comfortable in PW every day... I'd really like to get this working but my entire site is already built using the Beginner profile and is currently public, I can't rebuild it using the markup regions output strategy. I have my Snipcart account created, the API test is validated but I have the same issue as reported above by @fruid:

    Call to undefined function ProcessWire\ukIcon()

    Note: this project is for a non-profit association and I'm currently donating my time but I would 100% not mind paying someone for their help, feel free to PM me if that's preferred ? 

  7. Hi all, I'm having an issue on my search page when using SeoMaestro, any idea how to resolve?

    Error:
    Exception: Operator '~=' is not implemented in FieldtypeSeoMaestro (in
    /home/kbellaspa/public_html/wire/core/Fieldtype.php line 693)

  8. 10 minutes ago, horst said:

    try it like this:

    Yeah dude - that was it!! THANKS! So now, I can just comment out the die('BREAK!!'); and reload the script? Then if everything looks good, remove the script from the server? 

  9. Just now, horst said:

    so you need to check that the fieldnames (your old fieldnames and the new ones) are adressed correct in the script part that came from Wanze.

    Also you can output the result of the save() method, for example by using var_dump($p->save()); 

    Does it matter that my site only has one language (english)? I see that the foreach from Wanze is for a multi-language site. 

  10. 6 minutes ago, horst said:

    Hi, you need to remove my name from the check, if its a Superuser, who called the script.

    Wow, I can't believe I missed that, sorry. OK, so I replaced your name with mine (admin) and uncommented die('BREAK!!'); - now I see the following message but when I open the homepage in PW, the text from seo_title and seo_description hasn't been added to title and description in the seo field.

    www.domain.com :: seomigrate.php
     - [1 / 343] Home
    BREAK!!
  11. 3 hours ago, horst said:

    Here an example. NOTE: Not tested, written in the browser

    Hi @horst, thanks for the tips! I definitely don't need to use the migrator module, I didn't even know you could run a script like this, lol. So I backed up my DB and copied your script to a new file (seomigrate.php), uploaded that next to index.php in root and then opened that file in a browser but all I see is "RIP". I checked my pages and none of the data has been copied to the seo field. I thought maybe it was my selector so I found this ProcessSelectorTest module to verify the selector is working correctly, there were 343 pages found. Any idea what I'm doing wrong? I'm not much of a programmer, mostly a front-end guy so please forgive my ignorance ?‍♂️

    <?php namespace ProcessWire;
    
    // prepare server for continuous output
    if(function_exists('apache_setenv')) @apache_setenv('no-gzip', '1');
    @ini_set('zlib.output_compression', 'Off');
    @ini_set('output_buffering ', '0');
    @ini_set('implicit_flush', '1');
    @ob_implicit_flush(true);
    @ob_end_flush();
    //if(isset($_SERVER['HTTP_HOST'])) header('Content-Type: text/plain');
    
    
    // bootstrap PW
    require_once('./index.php');              // here you bootstrap PW, after that line you will have available the most PW variables and functions.
    if(!$user->isSuperuser()) {               // when using those scripts online, I do secure them with forcing a login in the admin as Superuser, ...
    
        echo "ACCESS DENIED! ($user->name)";
        exit(1);
    
    } elseif($user->isSuperuser() && 'horst' == $user->name) {  // and where are multiple superusers registered, additionally limited to my username
    
        echo '<pre>'.$_SERVER['HTTP_HOST'].' :: '.basename(__FILE__)."\n";
    
    	$selector = " seo_title|seo_description!='',include=all ";
      
        $pa = $pages->find($selector);      // or: $pa = $pages->findMany($selector);
        $max = count($pa);
        $cur = 0;
    	foreach($pa as $p) {                // loop over all collected pages
        	set_time_limit(30);             // renew the time limit for each loop, so that you may run this script long times, but lets it time out on failures in a reasonable short timeframe
            $cur++;
    		
            // following do your work
            if(!$p->hasField('seo')) {
            	continue;
    		}
    		echo " - [$cur / $max] {$p->title}\n";
    		$p->of(false);
    		foreach (wire('languages') as $lang) {
                wire('user')->language = $lang;
                $title = $p->seo_title->getLanguageValue($lang);
                $desc = $p->seo_description->getLanguageValue($lang);
                $p->seo->meta->title = $title ?: 'inherit';
                $p->seo->meta->description = $desc ?: 'inherit';
    		}
    		$p->save();
    		$pages->uncacheAll($p);         // after saving, uncahe the current page
    		//die('BREAK!!');               // just when first test the script before processing all items
    	}
    
        die('<p>READY!</p>');
    }
    die('RIP');
    
    ?>

     

  12. On 3/12/2019 at 6:20 AM, Wanze said:

    @tiefenbacher_bluetomato Here is an example script from my migration. 

    
            $pages = $this->wire('pages')->findMany("seo_title|seo_description!='',include=all");
    
            foreach ($pages as $page) {
                if (!$page->hasField('seo')) {
                    continue;
                }
    
    			$page->of(false);
                
    			foreach ($this->wire('languages') as $language) {
                    $this->wire('user')->language = $language;
                    $title = $page->seo_title->getLanguageValue($language);
                    $desc = $page->seo_description->getLanguageValue($language);
                    $page->seo->meta->title = $title ?: 'inherit';
                    $page->seo->meta->description = $desc ?: 'inherit';
                }
    
                $page->save();
            }

     

    Hi, I'd like to add this module to an existing site that is 400+ pages, I see you have this handy-dandy script and it should work perfectly for my needs because my setup is identical to yours - basically, I have a text field (seo_title) and a textarea field (seo_description) that I would like to copy over to my new seomaestro field (seo). I've installed the Migrations module but I have no idea how to run this script with it. I tried looking through the Migrations forum but it's all Greek to me. I'm hoping one of you talented folks can shed some light so I don't have to copy and paste 800 lines of text, lol. Thanks! ?

  13. 46 minutes ago, nbcommunication said:

    Pop this before your call:

    
    $instagram = $modules->get("InstagramBasicDisplayApi");

     

    Thanks! I can see the images now but I don't see any documentation on how to adjust the thumbnail dimensions. Ideally, I would be able to set the width and height of the thumbnails and then open the {src} in a lightbox/modal, is that possible? Something like this?:

    <?php
    $instagram = $modules->get("InstagramBasicDisplayApi");
    $images = $instagram->getImages(9);
    echo "<div data-lightbox='gallery'>" . 
      $images->each("<a href='{src}' data-lightbox='gallery-image'>" . 
                    "<img src='{thumb}' alt='{alt}'>" . 
                    "</a>") . 
      "</div>";
    ?>

     

  14. 1 hour ago, nbcommunication said:

    The module is now ready for use in production.

    Hi, I decided to test this out but it's not working for me. I was able to complete the configuration using your instructions so my IG user account shows up under Authorized Accounts but when I try to load the page, I get this error: Fatal Error: Uncaught Error: Call to a member function getImages() on null in /home/clientname/public_html/site/templates/_sidebar.php:59

    Here's my code:

    <?php 
       // Get 9 images from the default user
       $images = $instagram->getImages(9);
    
       // Render the images
       echo "<div data-lightbox='gallery'>" . 
        $images->each("<a href='{href}' data-lightbox='gallery-image'>" . 
          "<img src='{src}' alt='{alt}'>" . 
         "</a>") . 
       "</div>";
    ?>

     

  15. On 2/21/2018 at 10:46 AM, adrian said:

    1) It looks like the UiKit theme issues are fixed

    Hi @adrian, I'm having this same issue with the display but I'm using the most recent version of Recurme and PW. Do you remember how this was resolved or can you point me in the right direction? I know this plugin isn't supported anymore but it looks like it does exactly what I need so I'm hoping I can make it work. Does anyone have plans to take over management of this module? Any help is most appreciated, thank you!! ?

     

    calendar.png

  16. 4 hours ago, kongondo said:

    I hope you can forgive my 'ineptitude'. I have been royally swamped.

    Not a problem at all @kongondo, I know how it goes ?

    Quote

    At the top of your blog-posts template file, insert the following, just above your first include:

    
    if($input->urlSegment1) {
    	// @todo: test this with Jumplinks. In that case, comment out "session" code below
        throw new Wire404Exception();
    	// redirect to main blog page. if using this, comment out 404 exception code above
        // $session->redirect('/blog/');
    }
    

    I used the first option with Jumplinks and it WORKS!! Hallelujah, thank you so much for your time.

    • Like 1
×
×
  • Create New...