Jump to content

Marco Ro

Members
  • Posts

    347
  • Joined

  • Last visited

Everything posted by Marco Ro

  1. Hi, some time the website give me this error : Warning: touch(): Utime failed: Operation not permitted in /share/CACHEDEV1_DATA/Web/site/wire/core/FileCompiler.php on line 391 When I refresh the page the error disappears, but random some time shop up. Some one kwon about what is it? I work with the 3.0.96 version. Thank you.
  2. Very nice! Me too I like your payment way. I didn't know it maybe I will you too. How you have setup the product page for ask the double variation of product? I mean you ask for the 1° variation the Size on the T-short and the 2° if men or woman. How did you do it? The only things that I not like a lot is that: if i'm on one category page, like Tate Bag, and change language the page start again from the homepage. and I have to click twice for change language. In the single product page this not happen. Also in the cart happen something to similar to change language. Anyway I like it! good job!
  3. Yes @theo now work well. Thank you so much
  4. Hi @abmcr, if you are not super admin when you click on the button to pick the image it opens a windows with Media Files page like you are in the page, so you ca not choose the file to add but you can edit it.
  5. Hi Guys, I have a little problem, this module it's possible use only with the Super Admin User, is it possible set it also for other user? Thank you Btw I use a lot this modulo In combination with the Media Library! it's very great!
  6. Thank you @Soma for the good tips. ok so, now if I use this: "media" => $_SERVER['HTTP_HOST'].$page->image_card now when I inspector the pop box in the src tag I can see the correct link on the image. I think when I will go online I will see the image.
  7. Hi, @Macrura, thank you. Yes this was te first things that i did, I setup well the meta tag, indeed when share the link on social I can see all information uploaded correctly. The problem is only using the modulo. Hi @Soma, thank you for reapply me. I link this method, but when I try to use the options array show up an alert message that says: Error: Call to a member function httpUrl() I try to use a different array like call just: "media" => $page->my_field but anyway give ma beck a Error: Call to a member function render()
  8. Hi everyone! How I can set correctly the media={media} ? Because at moment no social uploads any image, ex: on Pinterest the html output miss the SRC attribute. to try to set the media I try to use my image filed but doesn't work. I try in the module and also in the backend. But the page load a src={my_filed}. Any Idea? What I can do? Thank you
  9. Hi, is there the possibility to have on click to the mark a box with some information? Now when I click on the mark I get redirected to a page in the backend. At moment I render the maps in this way: <?php $map = $modules->get('MarkupGoogleMap'); $places = $page->Dealer_Finder; echo $map->render($places, 'map_rp'); ?> I use this because I have a Maps field inside a Repeater Field and I need all mark in one map. All the information I render after the maps in a loop, I will like show an a part of this info in a box that appears on click to the mark. How I can do this?
  10. Hi, I can't understand why this happens: Ex Facebook: I tried to post the link on the facebook page and form there I can see Title, Description and the image. But If use the share button this doesn't work in the same way. This is my options chosen for facebook: ?url={url} --> I see only the link (this is correct) ?url={url}&title={title}&text={text}&media={media} --> I see only the link Ugual for Pinterest and for twitter not take any image. Pinterest --> ?media={media}&url={url}&description={text} Twitter --> ?url={url}&title={title}&text={text}&media={media} I try to set the {media} for take the field where is my image but probably I set it wrong. How I can do ?
  11. HI @James Ulrich, For a web developer work you have to learn multiple languages, there are no other ways. I have I attended online courses here: www.udemy.com // basic level https://www.skillshare.com/ // basic level https://www.edx.org/ // basic and advance level, with good degree. It's a MIT platform https://laracasts.com/ // very good for php and Laravel https://www.codecademy.com // medium level Try to make website it's a very good way to learn and pw give you a very good tools to put into practice what you learn. Enjoy!
  12. Hi @zeka, thank you, So sorry but not work. I added it this way: <?php namespace ProcessWire; class CustomPrices extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Custom Prices', 'version' => 1, 'summary' => 'Example module for modifying prices in Padloper.', 'singular' => true, 'autoload' => true, 'icon' => 'money', ); } But I Found the error! The name of 'title' => 'Custom Prices' need be the exactly the same of the file name in this case: CustomPrices.module Sorry I didn't know this. Now the module is installed. I correct my answer: The name of class CustomPrices need be the exactly the same of the file name in this case: CustomPrices.module
  13. Hi guys, I installed the latest this version of PW the 3.0.96. I notice this error when I try to install a custom module: I try to install my module and this not works. But I also try to install the demo CustomPrices.module the on it's in the Padloper documentation and ugual doesn't work. So I think that maybe could be a bug of the new version. I use: php 7.1.8 in localhost with mamp, server Apache, and run the last version of PW the 3.0.96. Cheers
  14. Hi guys, so I don't know if write here or not. Anyway, I installed the latest this version and I notice this error when I try to install a custom module: I try to install my module and this not works. But I also try to install the demo CustomPrices.module in the Padloper documentation and ugual doesn't work. So I think that maybe could be a bug. Cheers ( If I wrong to write here or it's not a bug, sorry! delate this message! )
  15. Thank you @kixe, yes sorry for the _x() I didn't know, thank you for your explanation. I was try also without _x() and before didn't work. But Now I have understand my error, I didn't call ed $user->. Now when I switch between languages the tag lang change! because it recognizes the language that the user user has selected. Thank you again!
  16. Hi @kixe I try to do something similar, but at me don't works really well. So, I using this for add the hreflang inside the <head> and this works well <?php $homepage = $pages->get('/'); foreach($languages as $language) { if(!$page->viewable($language)) continue; $url = $page->localHttpUrl($language); $hreflang = $homepage->getLanguageValue($language, 'name'); echo "\n\t<link rel='alternate' hreflang='$hreflang' href='$url' />"; } ?> But when I try to use inside the <html lang="<?php echo _x($hreflang, 'HTML language code') ?>"> or try your code <?php $leng = $pages->get(1)->getLanguageValue($language, 'name'); ?> <html lang="<?php echo _x($leng, 'HTML language code') ?>"> In all cases I have back only lang="en" And not show me other $languages. Do you know way? Thank you
  17. yes, sorry. I using Padloper, I mean customize the form that appears after the click of the button. Yes I think come form Stripe, but is not possible customize it? I found this example on stripe website: https://stripe.github.io/elements-examples/
  18. Please, someone can explain me how I can customize the style of the Stripe payment form? I try to use the same class but doesn't work. I looking inside the module but not have find any css file. If the style come from Stripe how I can change it? I see the Stripe doc, but I don't have understand well, the module works differente, there isn't one page with the form. or not? Thank you.
  19. Please, someone can explain me how I can customize the style of the Stripe payment form? I try to use the same class but doesn't work. I looking inside the module but not have find any css file. If the style come from Stripe how I can change it? I see the link of the doc, but don't have understand because our module work differente, there isn't one page with the form. or not? Thank you.
  20. Thank you @kongondo. Btw I use this for solve that problem with the double variables. I just make an other product page for a type of variation, and connect the pages through a normal link. the page is like mirror so I can do. I use also the page reference field, that works nice.
  21. Hi, I want show in one page a list of pages titles that have a specific category. For give this particular category I think to use a options field. (this is an extra category) Is it possible use in combination with this: $page_category = $pages->find("template=single-forniture"); for filter only the pages they have the options field checked for a specific value? Thank you!
  22. yes this is true, I think I need do this with javascript. yes I use Padloper, I followed all the documentation, and have made all the pages like is in the tutorial. Also using the ajaxified for the cart buttons. After I changed the cart-view templates quite a lot, but don't have tuched the cart-add-product. This is my ajax: // jQuery example of how to make add to cart buttons ajaxified $( ".padloper-cart-add-product" ).submit(function( event ) { event.preventDefault(); var $form = $(this); var url = $form.attr("action"); // Send the data using post var posting = $.post(url, $form.serialize()); var timer = 4000; posting.done(function(data) { if (data.errors) { var str = ''; $.each(data.errors, function(i, val) { str = str + val; }); $("<div id='colorchoose'></div>").appendTo("#ask").html("Please choose a color").delay(4000).fadeOut(timer); } else { $("#cart-trigger").find("#totalQty").html(data.totalQty).end(); $("<div id='conferm'></div>").appendTo("#contact").html("<span>Your products is Add!<br>check your cart <a href='" +rooturl+ "cart'>here</a> or keep to shopping</span>").delay(4000).fadeOut(timer); } }); }); This is my cart-add-product that it's ugual to the original in the documentation <?php namespace ProcessWire; ?> <form method="post" class="padloper-cart-add-product" action="<?= $config->urls->root ?>padloper/add/"> <?php if ($askQty) echo "<input type='number' name='qty' value='1'/>"; if ($redirectUrl) echo "<input type='hidden' name='redirect' value='$redirectUrl'/>"; if ($variationId) echo "<input type='hidden' name='variation_id' value='$variationId'/>"; echo "<input type='hidden' name='product_id' value='{$product->id}'/>"; ?> <input class='btn-cart' type='submit' name='pad_submit' value='<?= __("Add to cart") ?>' /> </form> In the backend at moment I have make the product with: 1 variation for the Color and 1 variation for the Angle. I add more or less your php code and this give me this output: <form method="post" class="padloper-cart-add-product" action="/playwood/padloper/add/"> <p>Colors</p> <div class="append-buttons"> <input class="green" type="radio" name="product_id" id="color_1143" value="1143"><label class="green" for="color_1143"></label> <input class="blue" type="radio" name="product_id" id="color_1139" value="1139"><label class="blue" for="color_1139"></label> <input class="army" type="radio" name="product_id" id="color_1140" value="1140"><label class="army" for="color_1140"></label> <br> <select id="angles" name="product_id"> <option value="1935">90°</option> <option value="1936">105°</option> <option value="1937">150°</option> </select><br> </div> <div><span id="ask"></span></div> <div class="value-button" id="decrease" onclick="decreaseValue()" value="Decrease Value">-</div> <input type="number" id="number" value="1" name="qty"><div class="value-button" id="increase" onclick="increaseValue() " value="Increase Value">+</div> <br> <input class="btn-cart" type="submit" name="pad_submit" value="Add to cart"> </form> You say true I have to use js for combine the two values and send it in the cart like a single product_id, also because they have some pad_price tax and shipping. Maybe it is enough send only the two variable titles color and angle name. I think... but not sure how do it. Thank you kongondo for your help!
  23. I link your code! yes it's cleaner. Thank you. I see missing the name='product_id' to the <select> but when I add it to the code, the cart pass only the angle product. (like pass the last value) The solution could find a way to adding multiple products in one time, or pass two products inside to the product_id but I don't know it's possible.
  24. @kongondo thank you! both solution could works. probably the second could be nice, because I also will have friendly backend. Maybe I can make the products like you say, separated. 1 page for colors and the 3 angles. but I want try to make then like variation, with a specific class (like a category) and then echo the 2 foreach filter by the category. Then I have to understand how with Ajax send to the cart like 1 single product. Do you think could works? The critical part will be the foreach and send via ajax, I'm not sure I can do it but I try! Thank you!! @3fingers thank you. this could be an away. I read about Snipcart. We have thinked to integrate an outside process of cart and checkout, instead of using Padloper. But honestly Padloper is very great and ductile tools. It's possible do more or less everything, with a bit of experience. Only the checkout isn't very the best, I will like change the progress step and it isn't easy to do. But all the Cart part it's very nice! and shipping, tax and payment process are easy to setup and above all integrated with pw. Update. This works, filter the input and I can see only the one have the variation color and the variation angle. foreach ($page->variations as $p){ if ($p->color_choose->title){ $addcart .= "<input class='{$p->color_choose->title}' type='radio' name='product_id' id='{$p->id}' value='{$p->id}'>" . "<label class='{$p->color_choose->title}' for='{$p->id}'></label>" . "</input>"; } } $addcart .= "<br /><select>"; foreach ($page->variations as $ps) { if ($ps->angle_choose->title) { $addcart .= "<option name='product_id' value='{$ps->id}'>{$ps->angle_choose->title}</option>"; } } $addcart .= "</select><br>"; But I don't know how send via ajax this two info in one product. At moment I use the example I read in the documentation: https://www.padloper.pw/documentation/making-it-ajax/ In this way in the cart arrive only the Color choose. Or The solution cloud be to hook ___addProduct in card-add-product. somethings like this:
  25. Thank you for your reapply @kongondo. If I have understand well what you say is similar like you show in your video. I see the different between your module and Padlopar, and I like your module. My problem is about the frontend. In the way my output is: Input ( Color, Size ) Input ( Color, Size ) Input ( Color, Size ) Input ( Color, Size ) ... But I have like 10 colors and 3 size. So, I will have 30 different products combination. On the frontend 30 inputs are to much to show on the page, ok I can use select with options, but it isn't friendly interface. What I would like to do is have 10 inputs for choose the color and 3 inout for the size. in this way the interface is more friendly. I try to make a two differente loops for color and size, but what I did in the first post of corse don't works. do you think there is a way? This is the situation with the code in the first post: What I would like to do is have one input for a each color, and 1 input for each angle.
×
×
  • Create New...