Jump to content

ank

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by ank

  1. Hi i'am trying to resize a image from a child page who has his own template:

     

    on the home page i render all the child pages who have there own php template:

    foreach($page->children() as $section){
    echo $section->render();
    };

    On the child page the php contains:

    $image = $page->image;
    $thumb = $image->size(300, 150);
    echo <img src='$thumb->url'>;

    the $thumb is not generated and i get a error:
    "Look out… Fatal Error: Uncaught Error: Call to a member function size() on null in site/templates/welcome.php:23" 
    "welcome.php" is a child template.

    when i use :

    echo <img src='$page->image->url'>;

    it display the image.

     

     

  2. Sorry for the late response, but are learning from the examples. I am also trying to make a sidecart with this examples but cannot refresh the cart when clicking on "add to cart" button.

    I can update "$padloper->cart->getNumberOfTitles()" without page reload, but how to do it with a complete render of the cart ?

    Is there a place where i can find all functions of padloper like the total quantity of items in the cart (not quantity of products in cart) ?

    Thanks

  3. Hello,

    when i add or update the cart, the page reloads to the overview grid/productpage (although the cart is updated), even when i add a product from a single product page.
    I use the example code:

    // get the $cartRender class
    $cartRender = $padloper->cartRender;
    // get the product whose add to cart button you want to be rendered
    // @note: it is assumed you already retrieved $product as per the example linked to above
    // render the add product to cart form
    $content = $cartRender->addToCart($product);
    $out .= $content;

    Is there a way to update the cart without reloading the page, only add or update the cart.

     

  4. On 9/6/2018 at 5:07 PM, joris_ross said:

    Hi,

    Everything went fine installing this module, but after completing the proces it doesn't find my google-account.
    Anyone else out here who had the same problem or knows a fix? 

    Thanks in advance...

    Schermafbeelding 2018-09-06 om 16.59.52.png

    You have to enable the Analytics API in the Google console

     

  5. Hi everybody,
    i am looking for a way to "mark" only one image in a imagesfield with multiple images, so i can request it on the homepage.

    I am making a collection of pages with images and on the home page i want to display one image out of every childpage (not the first image of every child)

    "I have been thinking on a switch next to the images so that i can "mark" the image, only one image in the imagesfield can be "marked"

     

    Any ideas how to archive this ?

     

  6. 2 minutes ago, adrian said:

    The video fieldtype can do autoplay and loop - take a look at the Mediaelement API (https://github.com/mediaelement/mediaelement/blob/master/docs/api.md). You can also completely replace the video rendering code in the settings of the module with another player if you'd prefer. Not to say that a normal files field isn't fine, the Video fieldtype just makes it easier to manage videos in the backed because it creates images, shows the length of videos, and a few other things. Really depends on your needs as to what will be best.

    I check this out, seems very suitable !

    Thanks

  7. I'm seriously struggling with a form

    is it possible to redirect to a page after send, and still use the submitted fields.

    what i want by example on the redirect page is:
    IF answers on question1 = "yes" then echo "You answer was YES";
    and this for several fields

    Regards

  8. I'm thinking of buying FormBuider,
    but first i want to know if i can use it for my needs.

    I checked the features of FormBuilder and found these:

    • Send an auto-responder
    • Conditionally email form submission to different people based on field values
    • Display a success message, redirect to another URL or pull text from another page to display after form submission

    but i want to know, if its possible combine these to:
    redirect to a page that displays content based on (different) fields values just submitted from the form?
    or
    auto-respond a email based on the field values.


    example:

    if $formfield1="elephant" -> echo "your choice was an animal"
    if $formfield2="blue" -> echo "you selected a blue elephant"
    ...

     

    Thanks

  9. The Google api console is changed,

    in follow the installation instructions, but because some things are changed is there probably a setting i in the API console i missed. The Analytics API is activated in the API console.

    In the module in processwire i can autenticate, but see only older projects i made in the api console, not the new just activated project.

     

×
×
  • Create New...