• Content count

  • Joined

  • Last visited

Community Reputation

26 Excellent

1 Follower

About MarcoPLY

  • Rank
    Sr. Member
  • Birthday 05/08/1987

Profile Information

  • Gender
  • Location
    Reggio Emilia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. MarcoPLY

    I try look if I can do something, but with me poor skill I think I need your help. I know your are busy, hope to not disturb too much. Maybe the issue is in the InputfieldImagePicker, could be add extra $field->set ? so that the url can change based on the change of the main URL. And also, add the possibility to resize the width? I'm nor sure if InputfieldImagePicker is the right place to make these changes. anyway if you are busy it's ok, np.
  2. MarcoPLY

    Hi @theo, I tried to fix this but I can't find the way. I think the problem is about the url. I try to debug but there are different situation and I can' find a patter. So, in home page in the pre-set language this work: <?php $image_forni = $page->getInputField('ima_2')->getImage()->width(600); echo " <img src='" . $image_forni->url . "'>"; ?> But If I change language not work. give me Uncaught Error: Call to a member function width() on null I tried $page->getInputField('ima_2')->getImage()->url in this way for the second language the error is Trying to get property of non-object Inside the page where the url have the language path is like work in both languages <?php $image_forni = $page->getInputField('ima_2')->getImage(); echo " <img src='" . $image_forni->url . "'>"; ?> But if I use $image_big = $post->getInputField('image_card')->getImage()->width(600); give me back an error in both languages Fatal error: Uncaught Error: Call to a member function width() on null I don't know if this can help you, if you don't have time maybe can give me some tips? Thank you!
  3. MarcoPLY

    Hi @theo, Do have you ever tried to use api for get the url in a multi language website? Because I notice a problem with the code above. maybe I wrong something, the problem is only when I use a different language. At moment If I switch to the second language I see the error page with this error: "Call to a member function width() on null" or size() Do you know why? What did I do wrong?
  4. MarcoPLY

    I see this notice: [InstagramFeed]: No data was received for 'nome_user' (recentmedia). [InstagramFeed]: No user '' was found. I use the correct user name and I checked all the keys access and these are correct, also the token. I saw that the account registered the permission to use my app. So, I don't know maybe I miss something... What I can check ? FIXED: In the end I find that if I disable implicit OAuth and not force the signed requests everything works well. btw I don't know if is a good things!
  5. MarcoPLY

    Sorry @theo ! I don't know way I looking in all forums but not in your documentation!! sorry! btw post the answer here just if some one will need: <?php $features = $pages->find("template=single-design"); ?> <?php foreach($features as $product): ?> <?php $image_big = $product->getInputField('image_card')->getImage(); $image_right = $image_big->size(250,250); ?> <img src="<?= $image_right->url ?>"> <?php endforeach; ?>
  6. MarcoPLY

    Hi, I have a problem to use the size api for resize the images. This is an example of my situation: <?php $features = $pages->find("template=single-design"); ?> <?php foreach($features as $product): ?> <?php $image_big = $product->image_card; $image_right = $image_big->size(250,250); // this give me error "call to a member funtion size() on null" ?> <img src="<?= $image_right ?>"> <!-- If I use $image_big the images show up correctly --> <?php endforeach; ?> What I can do for resize the images? I also have try to use the api like in the manual - But if I use url the images never show up, also first() doesn't work. $image = $page->images->first(); $thumb = $image->size(100, 100) echo "<img src='$thumb->url'>"
  7. MarcoPLY

    I thought you could do something like that: Maybe it's possible do only with some tag like recipe. (I can't confirm on this pasta) Absolutely yes, you have to spend some money in adWords. There are a lot of works to do for show up a good snippets, and in the end the best things it's just pay Google. The images in the middle are a good things, also we have start to setup the Google Merchant (which is very complicated again) for make the shipping campaigns.
  8. MarcoPLY

    Hi, I use Media Library module, sometimes does this: I upload an image, save the page, go out and when came back the image is delete. Does it happen to you sometimes? Some one know why? and what I ca do? Thank you
  9. MarcoPLY

    Thank you @wbmnfktr. Yes we take the truck of the pages, we will compare the pages. Do you think the product image will show up? Now there is the new url so maybe need just wait some days. (hope)
  10. MarcoPLY

    Yes sure this is what I use for the product page if($page->template == "single-connectors"){ $products = array( "@context" => "", "@type" => "Product", "aggregateRating" => [ "@type" => "AggregateRating", // I know this is not good "ratingValue" => "4.5", "reviewCount" => "3" ], "brand" => "", "description" => $page->Description, "name" => $page->title, "image"=> $_SERVER['HTTP_HOST'].$page->image_card, "offers" => [ "@type" => "Offer", "availability" => "", "price" => $page->pad_price, "priceCurrency" => "EUR", ], "audience" => [ "@type" => "BusinessAudience", ], ); } If you want you can check this link there is the live example of this page. I added it inside the header.
  11. MarcoPLY

    Yes was true need to add httpUrl. I added an image in this way: "image"=> $_SERVER['HTTP_HOST'].$page->field_image, I test with the google tools and now show me the exact url. In the browser is not visible but I guess we need to wait some days. Thank you!
  12. MarcoPLY

    Hi @wbmnfktr, Thank you for the web tool it's great. I have made the json-dl file and this work well, I can see a reach snipper with valuation, price, availability. There are all the info I put except for the photo. I use the same code I use in the header page->image_card and in the header work well that give me the correct url. But in the schema give me a different url, this one: \/site\/assets\/files\/1059\/nome.jpg . I don't know why, the description work well: $page->Description. Maybe the problem isn't here. How I can show also the photo of the product? Thank you!
  13. MarcoPLY

    hi, thank you @flydev and @Autofahrn I notice that happen this: when for some reason there are long requests something happen, first show me the general error 2006 and that the error to my custom module. I'm not sure it's the module's fault, could be just the first module that try to load? Anyway this is the modulo: CustomHooksForVariations.module - this normally work I already used. About the other post, sorry, I know it's my. I was thinking that conversation was end and was better open one in the modules section. If you want we can make only one or what you think is better.
  14. I can't understand why in the last tow days the website give this error and redirect to error 500. Error: Uncaught Error: Class '\CustomHooksForVariations' not found in /home/stef4341/public_html/wire/core/Modules.php:535 Stack trace: #0 /home/stef4341/public_html/wire/core/Modules.php(1000): ProcessWire\Modules->newModule('\\CustomHooksFor...') #1 /home/stef4341/public_html/wire/core/Modules.php(820): ProcessWire\Modules->loadModule('/home/stef4341/...', '/home/stef4341/...', Array, Array) #2 /home/stef4341/public_html/wire/core/Modules.php(352): ProcessWire\Modules->load('/home/stef4341/...') #3 /home/stef4341/public_html/wire/core/ProcessWire.php(390): ProcessWire\Modules->init() #4 /home/stef4341/public_html/wire/core/ProcessWire.php(209): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #5 /home/stef4341/public_html/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #6 {main} thrown (line 535 of /home/stef4341/public_html/wire/core/Modules.php) At moment to fix this I just delate my custom modules and reload it without changes and everything works well again. But why does this happen? What can I do to solve the problem? I see also these errors I don't know if there are a connection: Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /home/stef4341/public_html/wire/core/WireSaveableItems.php line 168) SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /wire/core/WireCache.php line 440) + line 704 + line 252
  15. Yes, the $UserPwName was not set. This one now work so well!! It's very nice, need just call the variable from json file and match them to the right filed and everything is as popular as it should be! Thank you so mach @Autofahrn! $http = new WireHttp(); d($http); // shows ProcessWire\WireHttp $UserData = json_decode($http->get('localhost:8888/playwood/pw_users.json'), true); d($UserData); foreach($UserData as $v) { // Fetch whatever fields should be imported $UserLoginName = $v["user_login"]; $UserMail = $v["user_email"]; $UserPwName = $v["user_login"]; $UserPwName = $sanitizer->pageName($UserLoginName, true); $usr = $users->get("name={$UserPwName}"); if($usr->id == 0) // User does not exist { $usr = $users->add($UserPwName); // Create user if($usr->id) // Success? { $usr->of(false); // Prepare for update $usr->email = $UserMail; $usr->pad_firstname = $UserLoginName; $usr->CheckBoxPrivacy = true; $usr->subscribe_newsletter = true; $usr->addRole('customer'); $usr->save(); } else { // may $log->error("ERROR creating user {$UserRealName}"); } } }