Jump to content

joe_ma

Members
  • Posts

    182
  • Joined

  • Last visited

Everything posted by joe_ma

  1. Exactly. But I am still stuck with the relational table and how to get it populate the page field. So I have the following situation: Imported files: addresses.csv –> imported without any problems categories.csv –> imported without any problems Template for addresses: Added PageReferenceField for categories; added field for address id from old table. cat_adr.csv: relational table with two columns - old address id - old category id –> replaced these with new pw id Now, how do I proceed to populate the PageReferenceField in address pages with the right pages from categories? Sorry, I am really absolutely helpless and appreciate any hints.
  2. Yes, I thought so much. But that is exactly my problem. Any clues on how to proceed? So there'll be an "old_address_id" on the address pages and an "old_cat_id" on the category pages. Plus there is the table that lists the relations between the two. How do I translate that to pw/php?
  3. Hello I am about to import csv files that have been exportet from a filemaker database, so as the customer can maintain the data through the backend. Now I have found this topic in the forum and I think, this might help me importing these tables. Unfortunately I am not that skilled with php to be able to tweek Ryan's module to meet my needs. So here's what I have got as tables from the export: addresses: addresses of institutions with information about what they do (about 650 data sets) offers: different offers like e.g. "translations", "language courses", "soliciting" etc. target audience: e.g. coummunities, professional, private persons … catogories: e.g. "old age", "work", "school" … And I have four tables that establish the relations between the tables. No I think it is fairly easy to import the tables with the basic information. I'd think the structure in pw would look like this: - addresses - address 1 - address 2 - address 3 - … - categories - category 1 - category 2 - category 3 - … - offers - kind of offer 1 - kind of offer 2 - kind of offer 3 - … - target audience - communities - professionals - private persons So far so good. In the templates for the addresses I can use page reference fields to select the categories, offers and audience (i.e. the relations as stored in the other tables). But how can I populate these fields while importing the tables, so as I don't need to do that manually after importing the tables? Thanks for help
  4. This module seems very promissing for my purpose. But I am not really sure, whether it really suits my needs. The problem is as follows: I have exports from a filemaker data base consisting of 6 or 7 .txt files for the relational tables. Of course I can easily convert them to .csv files. Now I should like to import these files into pw, so as the relations between the tables are kept and the data can be administrated through pw (the original filemaker data base is no longer available …). Is it possible to import these data with this module? If not, is there some other way to import the data in pw pages? Thanks for your answers
  5. Hello I got a strange error message: (retranslating from german …): file image-xxx.jpg rejected. This file already exists in the system and belongs to a different field. Does that mean, I cannot upload the same image to different pages? Thanks for help.
  6. After moving a site from my local xampp to a live server, I encounter problems with the images upload: even though the red progress bar goes up to 100%, nothing happens afterwards. No thumbnails. And after safeing the page, there are no images at all. I tried to change the module and .htaccess as mentioned above, but got no results. Edit: It turned out, that I had cropping information for landscape images, that exhausted the memory. So the thumbs could not be created. That seemed to have blocked everything.
  7. Thanks a lot. Works now. Sorry for the nuisance.
  8. I'd like to use this module for cropping images to use in a slider. So I setup a CropImage field that can be used to upload several images. It is called "slider". Now I don't get it working and need a hint. My code for the slider: $imgs = $page->slider; if (count($imgs)) { foreach ($imgs as $img) { echo "<li><img src='{$img->getThumb('slider')->url}' alt='$img->description' /></li>"; } }; Output: no images, only descriptions. Thanks for help.
  9. What is google?? But I don't think that answers my question. In the settings for the textarea field I checked (as is recommended) the extra plugin pwlink. So now, if you klick the link button in CKEditor you get the pw-popup with the only possibility to set the target, but no class or rel attribute. Though at the top of the js-file for this plugin there is this definition: (function() { CKEDITOR.plugins.add('pwlink', { requires: 'dialog,fakeobjects', init: function(editor) { var allowed = 'a[!href,target,name,title,rel]'; var required = 'a[href]'; So what I would like to have is that the pw-popup also shows fields for «title» and «rel» where I can set attributes for the anchor.
  10. Hello I should like to be able to add a class and/or a rel attribute to the links created with CKEditor. Out of the box it creates only links like this: <a href="somelink">Some link text</a> What I like users being able to do is <a href="somelink" class="my_class">Some link text</a> or <a href="somelink" rel="internal">Some link text</a> How can I achieve this?
  11. Thanks Totoff I've got to think about all that. And maybe try to convince the customer to use just one single domain …
  12. But then the "/fr/" segment is somewhat redundant, isn't it? And how would youre language switcher look like?
  13. Hello I am about to build a new multi-language site, that has a different domain name for each language. Like this: - german-name.ch (default language) - french-name.ch - italian-name.ch Now I wonder, what is the best way to deal with this situation. Just do it the simple way and point the french and italian domains to german-name.ch? Like this: french-name.ch --> german-name.ch/fr/ italian-name.ch --> german-name.ch/it/ Is this a good way user experience wise? Or would you rather suggest, that the language specific domain remain always in the URL? Like so: french-name.ch/fr/french-page --> language change --> french-name.ch/de/german-page or french-name.ch/it/italian-page If this is preferable, how can I do this? Thanks for help
  14. Hi I am trying to move a locally developped site to a live server. As I encountered problems with just copying all the files and importing the data base, I am trying now to do it with the profile exoport module. The export produces the following folders and files (PW 2.5.0): -assets -install -modules -templates -config.php Now I think, there is something missing, isn't there? How can I install this package without something like install.php. Or do I just take this file from the processwire master? Thanks for help. EDIT: Forget everything I wrote above. I forgot to copy the wire folder … Sorry for disturbing.
  15. Thank you all for these answers – most valuable ones, as always. That solved the problem. Thanks also for this one.
  16. On a site for a band I want to list all the gigs of the band, divided in three sections, coming up, today, past gigs. To produce the list I have the following code: <?php $timestamp = time(); $t = date("d.m.Y", $timestamp); $heute = $pages->find("parent=/konzertliste/, Datum=$t"); $gigs = $pages->find("parent=/konzertliste/, Datum>$t, sort=Datum"); $gigspast = $pages->find("parent=/konzertliste/, Datum<$t, sort=-Datum"); if (count($heute)) { echo "<h2>Heute</h2>"; //todays gigs, if any echo "<div class='block-group gig_list'>"; echo "<p class='block gig_date'>{$heute->Datum}, {$heute->Zeit} Uhr</p>"; //echo date("j. F Y", $page->modified); echo "<p class='block gig_ort'><a href='{$heute->url}'>{$heute->Ort}</a></p></div>"; } if (count($gigs)) { echo "<h2>Demnächst</h2>"; //gigs coming up } $out = ''; foreach($gigs as $gig){ $out .= "<div class='block-group gig_list'>"; $out .="<p class='block gig_date'>{$gig->Datum}, {$gig->Zeit} Uhr</p>"; //echo date("j. F Y", $page->modified); $out .="<p class='block gig_ort'><a href='{$gig->url}'>{$gig->Ort}</a></p></div>"; } echo $out; if (count($gigspast)) { echo "<h2>Bisher</h2>"; //past gigs } $out = ''; foreach($gigspast as $gigpast){ $out .= "<div class='block-group gig_list'>"; $out .="<p class='block gig_date'>{$gigpast->Datum}, {$gigpast->Zeit} Uhr</p>"; //echo date("j. F Y", $page->modified); $out .="<p class='block gig_ort'><a href='{$gigpast->url}'>{$gigpast->Ort}</a></p></div>"; } echo $out; ?> While it works as wanted for the gigs coming up and past, it doesn't for todays gig. On the frontend I get only the following output: Heute , Uhr And when I change the ">" in the fourth line to ">=" it works also correctly and todays gig is also listed in the "Demnächst" part. So why does it not in the todays part? Thanks for help
  17. Thank you soma for these clarifications. This sounds definitly like a good idea. I'll give that a try.
  18. Still struggling … The shopping cart and the order management as they come out of the box don't show the details of the orders. So in this case here, the overviews don't specify what exactly has been ordered. The code from post #3 in this thread produces the following lines: Donnerstag, 10. April 2014, 20:00 Uhr, Casino; Anzahl Plätze: 73, Preis: CHF 25.00. (plus add to cart form) Dienstag, 15. April 2014, 20:00 Uhr; Kino Krone; Anzahl Plätze: 44, Preis: CHF 25.00. (plus add to cart form) Which is as I expected. But in the overviews of the shopping cart and in the order management I see only this: Title of the event (i.e. the title of the event page), Number of Tickets, Price. How can I get the details of the show (i.e. the information from the repeater) as well, like this: Title of the event, date, location, Number of Tickets, Price ? And do you have any ideas for this: Thanks a lot for your precious help.
  19. I still can't get the shop working. I setup a new template "basket" with the template file "basket.php" where I put the following line: $modules->get("ShoppingCart")->renderCart() ; But when I add a ticket to the basket and then call the page with the basket template, that doesn't render anything.
  20. Yes, that did the trick. Thank you very much. So I can get one step further …
  21. Ok, thanks apeisa. So I put the sc_price and sc_qty fields on the repeater. For the output on the event page I loop through the repeater like this (the <li> is just for testing): foreach ($page->time_loc as $product) { //time_loc is my repeater field echo "<li>{$product->location->title}<br>Anzahl Plätze: {$product->sc_qty}, Preis: " . $modules->get( "ShoppingCart" )->renderPrice( $product->sc_price ) .".<br>" . $modules->get("ShoppingCart")->renderAddToCart(). "</li>"; } That results in the following output: Casino Anzahl Plätze: 80, Preis: CHF 25.00. Sorry, we are out of stock. Kino Krone Anzahl Plätze: 50, Preis: CHF 25.00. Sorry, we are out of stock. So, instead of having an "add to cart" button, it says "Sorry, we are out of stock", which clearly isn't the case (see "Anzahl Plätze: 50"). Where have I made the mistake?
  22. Hi I'm trying to setup a shop using Apeisa's shopping cart and can't get it running. I don't understand the second step of the readme file: Where and how do I add the sc_price class exactly? Or should it read "sc_price FIELD"? What I'd like to use the shop for is a ticketshop for a festival. The "products" in this case are the events, which are setup like this: - there is a page for every event, containing general information about the performers, duration, description etc. - as events can take place on several dates/times and locations (different shows of the event) with different amounts of tickets available, I get this information from a repeater field containing the following fields: date and time, location, show id, amount of available tickets (sc_qty), and price (sc_price) - the event.php template displays the general information and loops through the repeater to output a list of oll the shows How can I get an "add to cart" form, where I can select tickets for one of these shows? Can I produce my own form with a select box for the shows, that sends the information to the shopping cart? How can I handle different prices for members and nonmembers? There is no strict logic behind these differences, they are setup rather arbitrarily, there is no way to use a calculation of any sort. So I probably need two fields like sc_price_member and sc_price_nonmember, don't I? Customers should be able to buy tickets for members and nonmembers at the same time. Is my setup for the events suitable for this purpose? Or would you take a completely different approach?
  23. Thank you very much, Marcura! Now it works exactly as I wanted it to.
×
×
  • Create New...