Posts by Jonatan Ribeiro dos Santos • 454 points
15 posts
-
3
votes3
answers751
viewsA: Send email with dynamic content in PHP
Not the most beautiful alternative, but it can be used: <?php $nome = "Joaquim Augusto"; $validateKey = "auihr43qorehq3brhuq3dfiqawndi=="; $str = <<<EOF <!doctype html> <html…
-
5
votes1
answer224
viewsQ: How to merge into a file already minified with Grunt-contrib-uglify
Here’s the situation, I’m using the Grunt-contrib-uglify to minify my project’s javascript into a single file, the problem is that one of these files is already minified, and the uglify does not add…
-
1
votes4
answers868
viewsA: Find current page and change Div style
I won’t give you a kiss, just think a little, but follow an example of how to do: Before: html: <header> <ul class="nav"> <li><a href="#home">Home</a> </li>…
jqueryanswered Jonatan Ribeiro dos Santos 454 -
0
votes1
answer418
viewsQ: Loading jQuery on Gento only if it has not been loaded before
I need my module to only load the jQuery if he hasn’t already clicked on the page, I did it by javascript, but it runs very fast, even using 'setInterval' and etc.. In some cases they continue to…
-
0
votes1
answer109
viewsA: Enable fields in Customer/Account/create using code
I found the solution by seeing the system.xml they used a backend_model adminhtml/system_config_backend_customer_show_customer , who had the function _afterSave which defines the attribute as…
-
1
votes1
answer2127
viewsA: How to change product categories in Magento via Mysql?
How to use phpMyAdmin to move products from one category to another in Magento The admin panel offers a couple of ways to move products from one category to another. For example, you can move a…
-
0
votes1
answer109
viewsQ: Enable fields in Customer/Account/create using code
I’m developing a module where it will change the field value Display Data de Nascimento and Ver CPF/CNPJ in Configurações> clientes> Configurações> nome e opções de endereço. when this…
-
1
votes1
answer95
viewsQ: Create Observer in the Mage_core_model_app class for the run function
When looking at the class app\code\core\Mage\Core\Model\App.php, we have the following function: public function run($params) { $options = isset($params['options']) ? $params['options'] : array();…
-
0
votes1
answer96
viewsA: Debug instantiated classes in Magento
I found 2 solutions to my problem 1st Exists Mage_Core_Model_Config::getModelInstance public function getModelInstance($modelClass='', $constructArguments=array()) { $className =…
-
0
votes1
answer96
viewsQ: Debug instantiated classes in Magento
In the PHP there are methods get_object_vars and get_class that return information about the class, in Magento we can use Zend_Debug::dump(), the Mage::log() and even the Xdebug of PHP, but during…
-
0
votes5
answers21638
viewsA: Currency formatting to save to database as DECIMAL
As money needs an exact representation do not use data types that are only approximated as float. You can use a fixed-point numeric data type, such as numeric(15,2) 15 is the accuracy (total value…
-
0
votes6
answers52587
viewsA: How do I use a database on an HTML site?
You must install Apache, Mysql and PHP. One way to do this is to download XAMPP The next step is choosing an IDE, your choice: sublime, phpstorm, Netbeans. To enable PHP debugging you need to…
-
11
votes1
answer5272
viewsQ: What is a wrapper class?
What is a wrapper class? How they can be useful? Cite examples of use in php or c#, as well as when to use or not to.…
-
4
votes1
answer671
viewsQ: Creating new options for Magento attributes
I’m having problems trying to create new options in the "Manage Options" tab. When creating an attribute, I already know how to save the data correctly in the database. I am overwriting…
-
11
votes4
answers3950
viewsA: When to use ternary condition?
I recommend using it only when the resulting instruction is extremely short and represents a significant increase in concision over the equivalent if/Else without sacrificing readability. Good…