PrestaShopCorp / mercadopagobr

2 stars 9 forks source link

Code review comments #1

Closed Quetzacoalt91 closed 9 years ago

Quetzacoalt91 commented 9 years ago

While I am proceeding with the functionnal tests, here are the comments related to the code:

General:

            $conf_data = array('mercadopago_CATEGORY',
                'mercadopago_CREDITCARD_ACTIVE', [...]
                );

and then foreach on it:

            foreach ($conf_data as $conf_name)
                Configuration::updateValue($conf_name, Tools::getValue($conf_name));
if (!$this->active)
    return;
ricardobrito commented 9 years ago

Hi,

So how should I proceed to fix "URL stored in back_urls array may won't work when URL rewriting is enabled."?

Thanks

Quetzacoalt91 commented 9 years ago

Hi @ricardobrito,

You should use the function

Link::getModuleLink($module, $controller = 'default', array $params = array(), $ssl = null, $id_lang = null, $id_shop = null, $relative_protocol = false)

It will generate the properly URL, regarding your URL rewriting configuration in the BO.

ricardobrito commented 9 years ago

Hi @Quetzacoalt91 ,

I pushed all changes asked.

Just the following issue I didn't do since the new code checks some settings and that would be repetitive inside a foreach:

function getContent(): At the end, you could define an array like this

Please let me know asap if the module needs more changes.

Thanks!