Jump to content

Pitbull

Members
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Pitbull

  1. hi, i need help to build a website on pw, i need a search & booking request form, the logic is

     choose a pick up location (predefined locations from pages) then pick a drop of location again (predefined locations from pages) then choose how many passengers (1-4, 5-8, 9-12. etc) and then show the price which is based on the previous selections, example, pick up from point a, drop of on point b, 5 passengers, the price is 15 euro. And then the customer send the form thru email to administrator and the confirmation email is send to client automatic.

    Wait for suggestion of the cost, thank you!

  2. thank you Soma!! you are right it wasnt active, i did activate it, allso i check all other pages if set active and is all checked now.

    but now i get this error.. (when i am not in default language)

    Error: Exception: Can't save page 0: /en/wire/shop/orders/e4d79c0119d47b8a63b841402f3cd699/: It has an empty 'name' field (in C:\wamp\www\processwire-shop2\wire\core\Pages.php line 604)

    i notice that admin/shop/orders/ childrens when i create order the non default languages aren't set active, and they stay unpublish, and the title in default language is blank but non default language is filled.

    i really appreciate your help guys!

  3. hi to all and thank you! for help..

    apeisa you made a fantastic module!!

    i test it in localhost in a multi language site and is working great, only one issue when i am not on default language from step placing order to step pay order i get this error:

    Error: Exception: Can't save page 0: /e30bc646cfd69e1c90d6c19b945a3ab3/: It has no parent assigned (in C:\wamp\www\processwire-shop\wire\core\Pages.php line 604)

    #0 [internal function]: Pages->___save(Object(Page), Array)
    #1 C:\wamp\www\processwire-shop\wire\core\Wire.php(359): call_user_func_array(Array, Array)
    #2 C:\wamp\www\processwire-shop\wire\core\Wire.php(317): Wire->runHooks('save', Array)
    #3 C:\wamp\www\processwire-shop\wire\core\Page.php(1113): Wire->__call('save', Array)
    #4 C:\wamp\www\processwire-shop\wire\core\Page.php(1113): Pages->save(Object(Page), Array)
    #5 C:\wamp\www\processwire-shop\site\modules\ApeisaShop\ShoppingCheckout.module(571): Page->save()
    #6 C:\wamp\www\processwire-shop\site\modules\ApeisaShop\ShoppingCheckout.module(224): ShoppingCheckout->createOrder()
    #7 C:\wamp\www\processwire-shop\site\modules\ApeisaShop\ShoppingCheckout.module(152): ShoppingCheckout->renderConfirmation()
    #8 C:\wamp\www\processwire-shop\site\templates\sc-checkout.php(16): Shoppi

    and stays at placing order step

    this only happend on non default language, in default is working fine.

    any ideas?

  4. I am sory so hard to explain in english i will try with url's


     


    first page= http://localhost/allcr/en/cities


    when i click to city 1 i go to:


    second page= http://localhost/allcr/en/cities/city1/


    when i click to town 1 i go to:


    third page= http://localhost/allcr/en/towns/town1/


    when i click to vilage 1 i go to:


    fourth page= http://localhost/allcr/en/villages/village1/


    when i click to type 1 i go to:


    fifht page= http://localhost/allcr/en/types/restaurants/


     


    when i click to restaurants i want to see restaurants that belong to the vilage i click something like this will explain the conection:


     


    http://localhost/allcr/en/cities/city1/towns/town1/villages/village1/types/restaurants/restaurant1


     


    i need this type of familly conection


     


    i am sory i am in localhost i need to build it first and then go online


  5. thank you guys i think i do good with your help, this is what i do

    • Home
      • Shops
        • Gatos // HAS 4 PAGE FIELDS (example) city=City1, town=Town2, village=Village1 , type=Restaurants
        • Ammos// HAS 4 PAGE FIELDS= city, town, village, type
      • Cities
        • City1 // DONT HAVE PAGE FIELDS
        • City2 // DONT HAVE PAGE FIELDS
        • City3 // DONT HAVE PAGE FIELDS
      • Towns
        • Town1 // HAS 1 PAGE FIELDS= city
        • Town2 // HAS 1 PAGE FIELDS= city
        • Town3 // HAS 1 PAGE FIELDS= city
      • Villages
        • Village1 // HAS 1 PAGE FIELDS= town
        • Village2 // HAS 1 PAGE FIELDS= town
        • Village3 // HAS 1 PAGE FIELDS= town
      • Types
        • Restaurants  // DONT HAVE PAGE FIELDS
        • Cafe Bars // DONT HAVE PAGE FIELDS

    for every category i have a template:so page Cities have a template named cities now every children have a template named city 

    the same i did for the rest of categories-childrens

    the code i use to conect the pages is this:

    THIS CODE IS FROM CITY PAGE (CHILD OF CITIES) AND WORKING FINE
    <?php 
    $city = $page->title; // I USED THIS VAR TO DISPLAY DYNAMIC THE NAME OF THE CITY FIELD BELLOW*
    $vilages = $pages->find("template=town, city=$city"); // *HERE
    foreach($vilages as $child){?>
    <div class="col-md-4">
    <div class="lbl">
    <a href="<?php echo $child->url?>"><img src="<?php echo $child->imagecategory->url?>" alt="" class="fwimg"/><!--</a>-->
    <div class="smallblacklabel"><?php echo $child->title?></div></a>
    </div>
    </div>
    <?php } 
    ?>

    THIS CODE IS FROM TOWN PAGE(CHILD OF TOWNS) AND WORKING FINE
    <?php $town = $page->title; // I USED THIS VAR TO DISPLAY DYNAMIC THE NAME OF THE TOWN FIELD BELLOW* $towns = $pages->find("template=village, town=$town"); // *HERE foreach($towns as $child){?> <div class="col-md-4"> <div class="lbl"> <a href="<?php echo $child->url?>"><img src="<?php echo $child->imagecategory->url?>" alt="" class="fwimg"/><!--</a>--> <div class="smallblacklabel"><?php echo $child->title?></div></a> </div> </div> <?php }

    and i use same code for other pages only change the template= and field= , this i explain for some others new to lovely processwire like me.

    Now i need help!!

    in template Type the way the website works is home page i see the cities then i click city and go to towns click town and go to villages click village and go types HERE IS MY QUESTION:: i dont know how to do this request:

    $pages->find("template=shop, city=$city, town=$town, village=$village, types=$type");

    how to get dynamic field values? when i click the type page eg. Cafe Bars to view the Shops on this type (remember the shops belong to village that belong to town and then to city) how to code so when i am in type page that i click i see the shops that belong to village that belong to town and then to city that i clicked to come here.
    this is were i stack... Please help me..
     
    thank you!! and i hope my explain is good
  6. Hi! i need some help to build a listing website the way should work is like this: the bold is the categories and link

    CITIES                                   /// CATEGORY  ------ (TEMPLATE = CITIES)

    ----------City                            /// SUBCATEGORY OF CITIES  ------ (TEMPLATE = CITY)

    TOWNS                              //CATEGORY - ( SHOW ALL TOWNS ASSIGNED TO CITY SUBCATEGORY ABOVE ) (TEMPLATE = TOWNS)

    ------------Town       ///SUB CATEGORY OF TOWNS - ( SHOW ALL TOWN ASSIGNED TO TOWNS CATEGORY ABOVE ) (TEMPLATE = TOWN)

    TYPES                                   /// CATEGORY - (OF SHOP TYPES, LIKE (RESTAURANT, CAFE BAR, HOTEL) )  (TEMPLATE = TYPES)

    ----------Type                            /// SUBCATEGORY OF TYPES  (TEMPLATE = TYPE)

    SHOPS                                   /// CATEGORY

    -----------RESTAURANT DESTROS  (LETS SAY THIS RESTAURANT BELONGS TO City = Chania, Towns = Kydonia, Town = Platanias, Type = Restaurant )

    -----------CAFE BAR SUNLIGHT

    -----------CLUB DANCE TIME

    AND SO ON.........

    So when a visitor come to site and clik CITIES he see each City that assign to category CITIES, the same with Towns he see each Town,

    then when click the Town he see the each Type of Shops (Restaurants, Hotels, Bars etc..) and when he clik the type he is interesting lets say Hotels he then see the hotels that asigned to this City -> Towns -> Town-> Type.

    How can i conect them together?

    I follow this guide https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ so thats wy i come with this categories, i read a lot of simmilar posts in forum but there are to advance for me right now, so i am lost.

    Thank you in advance!
  7. hi Rjay, i am trying to echo style="direction:RTL" inside body tag if the user language is hebrew

    <body <?php foreach($languages as $language) { if($language->title == "hebrew"){ echo 'style="direction:RTL"';}?>> something like this? i cant make it work.

  8. hi! i have a question, i have multi language site and i need some way to change the direction when user language is hebrew from right to left - left to right, i try this 

    • foreach($languages as $language) {
    • if($language->title == "hebrew"){
    • echo 'style="direction:RTL"';
    • }
    • i read a lot of post but i dind find some solution.
    • thank you!
  9. hi!

    i have a field called bgimage and set it to hold 1 image, & assigned  to all of my site templates, with diferent images for each page, i want to use Vegas slideshow as background in my pages using a  bgimage, as src

    $.vegas('slideshow', {
        backgrounds:[
          { src:'images/background-1.jpg', fade:2000},
          { src:'images/background-2.jpg', fade:2000}
        ]
      })('overlay', {
        src:'assets/img/overlay.png'
      }); 
    

    how can i make bgimage field output in the code above

    thank you.

  10. hallo Joss very big help your tutorials!! and hallo forum!!

    i try to make a real estate site folow your guide is allmost what i need to do, but i need to add one more category for cities that property belong.

    can you please guide me how to add one more category, i dont know what to do.

    thank you

×
×
  • Create New...