Jump to content

Adam40

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • First Name
    Adam
  • Last Name
    Woj

Recent Profile Visitors

474 profile views

Adam40's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Conversation Starter Rare
  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Thank for Your reply, but I can't write modules for PrestaShop, so I wanted to do it with a simple php script. Can it be done somehow easier? Eg call the Mail::Send() function in my php file so that Presta sends the email using the built-in functions?
  2. I would like to add my own form on the homepage in PrestaShop 1.7. I add form fields in the tpl file displayed on the home page (e.g. in .tpl some module from home page). I would like to send it now with some simple php script, but it doesn't send anything to the email. How to do it? Add php code to what class? Whether to add the php code to the new file with action = "link to the file form-send.php" Because after clicking send it does not send the form to the email. I don't want to use the built-in contact form because I have different fields with product configuration. Below the code of the form and the php file. tpl <form action="/form-send.php" method="post"> <div class="col-xs-6"> <div class="form-group"> <label for="user" class="control-label">Name:</label> <input type="text" class="form-control" name="user" placeholder="Name and surname"> </div> <div class="form-group"> <label for="email" class="control-label">Email:</label> <input type="text" class="form-control" name="email" placeholder="e-mail address"> </div> <div class="form-group"> <label for="width" class="control-label">Width:</label> <input type="text" class="form-control" name="width" placeholder="cm"> </div> <div class="form-group"> <label for="length" class="control-label">Length:</label> <input type="text" class="form-control" name="length" placeholder="cm"> </div> <div class="form-group"> <label for="weight" class="control-label">Weight pack:</label> <input type="text" class="form-control" name="weight" placeholder="kg"> </div> <div class="form-group"> <button type="submit" class="btn btn-primary btn-lg">Send</button> </div> </div> </form> php file <?php $errorMessage = null; $successMessage = null; if ($_POST) { $user = isset($_POST['user']) ? filter_var($_POST['user'], FILTER_SANITIZE_STRING) : null; $email = isset($_POST['email']) ? filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) : null; $width = htmlspecialchars($_POST['width']); $length = htmlspecialchars($_POST['length']); $weight = htmlspecialchars($_POST['weight']); if (empty($user) || empty($email) || empty($width) || empty($length)|| empty($weight)) { $errorMessage = 'Complete all fields!'; } if (is_null($errorMessage)) { mail( '[email protected]', 'Form from my Shop', "Message: $width \n\n $length \n\n $weight \n\n Name: $user \n\n E-mail: $email", "From: $user <$email>" ); $successMessage = 'Message was sent'; } } ?>
  3. I would like to get my Page Title for search site from SEO & URLs Preferences and add to end my search word. For example on title search site I would like to have: " Your results for iPhone" What doing this? You have any ideas for this?
  4. REGE kod działa przy zmianie atrybutów i też nie odświeża całej strony. Dzięki!
  5. Witam, mam podobny problem więc piszę tutaj. Chciałem pod normalną ceną brutto pokazać (cenę + dostawa) np 20zł w product.tpl dopisałem wiersz {convertPrice price=($productPrice+20)|floatval} jak produkt kosztuje np 100 zł to pokazuje poniżej poprawnie cenę, a pod spodem cenę z dostawą 120, ale jak zmienię atrybut tego produktu to nie odświeża mi tej ceny z dostawą i gdy produkt kosztuje drożej np 150zł to nadal pokazuje cenę z dostawą 120 a nie 170 Jak zrobić aby za każdą zmianą atrybutu odświeżało mi to pole?
×
×
  • Create New...