Posts by Gustavo Souza • 456 points
40 posts
-
1
votes3
answers113
viewsA: If condition not to show images that do not exist PHP
I commented the code for better understanding, you better use a foreach as it is better to avoid rework if you need to put an extra photo or remove, for is something manual where you arrow the…
phpanswered Gustavo Souza 456 -
2
votes5
answers73
viewsQ: Calculate date difference and print these days
I would like to calculate the difference of two dates and print out all the dates between them, for example: $data_inicio = new DateTime("08-02-2018"); $data_fim = new DateTime("10-03-2018");…
-
0
votes0
answers37
viewsQ: Configuration of the CRON
I’m trying to run a file in cron, but I’m not getting it. It would have some extra configuration that needs to be done? [root@ip-172-31-35-95 ec2-user]# crontab -l 1 * * * * php…
-
1
votes2
answers83
viewsQ: Query mysql return 4 Counts same table
I would like to make a select in the same table that counts 4 different values, all with clauses, I’m trying this way but I’m not getting it, I want each Count to be done in a STATUS where I specify…
mysqlasked Gustavo Souza 456 -
0
votes1
answer76
viewsQ: URL redirection http
I’m trying to do a url redirect, but it’s not working, could someone tell me what’s wrong? <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*)/teste(.*)$ // verifica se…
-
1
votes1
answer428
viewsQ: Ajax returning Undefined
I put an Else in my php function and it’s falling into Else, but I have parameters to get from the url. I have the following code in php: $utm_source = $_REQUEST['utm_source']; $utm_campaign =…
-
2
votes2
answers2040
viewsQ: How to remove the position of an array with jquery
I am trying to remove a position from the array with Slice, so I can only take it with the position of this array, could I take it for value? Because the position of the array changes a lot in each…
-
1
votes2
answers1617
viewsQ: Grab a css property with jquery
Could I check a css property with pure jquery or js? Note: Using is.(':Visible') is not feasible in what I need. Example: var display = $('.test').get('display').val() if(display == 'block') {…
-
-3
votes2
answers1875
viewsQ: Insert array into database
I didn’t post the entire code before because it was too extensive (I’ve summarized it by taking some irrelevant data), now it’s the entire code. I’m taking values from the products, I run a foreach…
-
1
votes1
answer813
viewsQ: INNER JOIN WITH WHERE MYSQL
I have a foreach that runs each product, then I would like to make a query in two tables from that ID, only I’m not getting, what I’m doing wrong? $collection =…
-
0
votes0
answers35
viewsQ: Insert data into a table from another 4
I have this code to enter data into the database, I would like to insert data from 4 tables into one. But consecutively, I tried this way only that it adds the same data to the last 3 tables and…
-
0
votes1
answer169
viewsA: How to insert values into a select when inserting them into the bank
I could not add already setting a numeric value, I had to change the values "in hand". in the part of the code where is the if is where I do the exchange of values, by pulling this value in the…
-
1
votes1
answer169
viewsQ: How to insert values into a select when inserting them into the bank
I need to enter data into the database, I’m taking data from an old database, I had some attributes that have a certain value, I created these attributes on the site so I can receive the data…
-
1
votes2
answers218
viewsA: Insert data into the database with php
Solution $users = Mage::getModel('customer/customer')->getCollection(); $i = 1; foreach ($users as $key => $user) { $id = $user->getId(); $usuario_loaded =…
-
0
votes2
answers218
viewsQ: Insert data into the database with php
I’m trying to insert some data into the database via php, but it can’t add this data, would anyone know what it might be? I give a var_dump in the array to see if it is pulling the data correctly…
-
1
votes3
answers285
viewsA: Give Hide/Show and show only contents of the clicked item
I switched the logic in the code by placing the Hide that was above the IF, inside the if, as it hid all the elements when being clicked independent of the IF was as if the other execution on line 4…
-
1
votes3
answers285
viewsQ: Give Hide/Show and show only contents of the clicked item
I want to show/hide the div by clicking on it and hide by clicking on another item, I am only able to hide by clicking on another item, by clicking on it I am not able to hide. Example of how the…
-
2
votes1
answer205
viewsQ: Custom jQuery Show function
I would like to know how to add "effects" in show and Hide, I tried to add in my code but did not succeed. Because I tried to show only a common div with class in css that gives the appearance that…
-
0
votes1
answer484
viewsQ: E-mail validation via jQuery
I am trying to do a validation in an email field, I even "can" do, but it is not 100% functional, I would like to cancel the button with the disabled attribute, until the user put a valid email, I…
-
1
votes1
answer25
viewsA: Javascript error when using Action
Solution: Since Magento is a platform that uses controllers, blocks and helpers, it "makes the interaction of its modules much easier", what I was trying to do was to pull an action out of that…
-
0
votes1
answer25
viewsQ: Javascript error when using Action
I’m trying to use a platform functionality that I use (Magento) only that I’m not getting, is being returned the following image error. I want to send newsletter on mobile, so I tried to copy the…
-
0
votes2
answers220
viewsQ: Hide/Show in Ivs according to subclasses
I’m trying to make a code that shows and hides some Ivs in the click, I tried to use css to help me, but I couldn’t. By the logic at the bottom of the "topic" click it removes the display class from…
-
1
votes1
answer50
viewsQ: Give Hide or show by clicking another element
I have 4 topics, and I would like to display only what I clicked, and if another one is open close, I know how to do this with jquery, but I’m doing it in a way that I don’t think is the most…
-
-1
votes1
answer387
viewsQ: Font icons BOOTSTRAP/CSS
I was looking at some sites and I saw that they are using some icons, but without the need to put an image, is used a font, I found it very interesting because you can change size, color without…
-
0
votes1
answer2416
viewsQ: Add a scroll bar to a DIV
I have a menu on mobile with some options, there is only one problem, when I’m fiddling through the phone it opens normal, but when I try to see all the options scrolling down it scrolls the home…
htmlasked Gustavo Souza 456 -
0
votes2
answers560
viewsQ: Change DIV via jQuery
I have a div with a class and when the screen is at 770px I have a code that changes this class. I would like to not only change the name of the class change it of position, display it in another…
-
0
votes2
answers1840
viewsQ: Change CSS with jQuery
I’ve changed css with jQuery, but I’d like to test a feature, in onclick it add a css, but a field :before how could I do that? Code working $j("#nome-login-mobile").click(function(){ if…
-
0
votes1
answer1060
viewsA: Check if the user is logged in
Controller public function verificaloginAction() { if(Mage::getSingleton('customer/session')->isLoggedIn()){ echo json_encode(array('retorno' => true)); }else{ echo json_encode(array('retorno'…
-
0
votes1
answer1060
viewsQ: Check if the user is logged in
I would like to do a check to know if the user is logged in, I am trying to pass this on to an ajax request but am not succeeding. PHP function that checks if you are logged in public function…
-
1
votes1
answer43
viewsQ: Button with writing on top of the other
I have this button, I’d like to add two words to it, but by displaying one on top of the other, I’ve tried one <br> between them but it’s like creating another button, I would like a button…
-
1
votes1
answer543
viewsQ: Grab file extension to send with attachment
I have a code that sends attachments, I saved it with custom name to find easier later in the database and also to make a more organized backup, but by this fact, it does not save the file…
-
4
votes3
answers6672
viewsQ: Validate file extension
I have a code that checks the size before sending the file, I would like to know how to check the file extension together, for example, I need these extensions .jpg, png, .gif, .pdf, .txt, .doc,…
-
0
votes1
answer1395
viewsA: Save date and time in database
Solution : Alter $emailarquivo = $_POST['email'].$_POST['datetime']; To $emailarquivo = $_POST['email'].$date = date('Y-m-d H:i:s');…
-
0
votes1
answer1395
viewsQ: Save date and time in database
I wonder if there is how I save the date and time of my system to be able to save in the database, I would not like to create a "created_em" and add the time in the database, what I want to do is…
-
1
votes1
answer39
viewsQ: How to make a Validator jQuery
Hello, I created a "part" field of the rest of my form, and I would like it to have the same "face" as the rest, I did a validation for it, to check whether or not there is already an element in the…
-
1
votes1
answer99
viewsQ: Request validation via jQuery, Json
I want to do a function that the customer type his order it is checked if it exists in the bank or if it is an invalid request. And I want to return this via Ajax, but I never messed with Ajax,…
-
1
votes1
answer62
viewsQ: Disable Submit function when appearing error message
How do I "block" or "disable" the form button when the error message appears? Input <input style="height:24px;" name="email" id="email" title="<?php echo…
-
1
votes3
answers267
viewsQ: Input email display only suggestions for EMAILS
Hello, I have an email input and to facilitate typing and everything else I would like a "auto suggestion", but it is showing everything I’ve typed with the letter G, for example including names,…
-
0
votes1
answer62
viewsQ: Do an if for another line
I have this e-mail sending code and the attachment, it is working perfectly when I send the email along with the attachment, but if I do not send attachment it an error, I believe it is on account…
-
1
votes1
answer395
viewsA: Magento Ajax Cart
I use this module to add the items to my cart Download the jQuery Here Save with the name jquery.js in Magento/js/jquery Create a file called noconflict.js in /Magento/js/jquery and put this inside:…
magentoanswered Gustavo Souza 456