Component: ec_buynow (sorry, I don't find it in the "Component" selection)

ec_buynow use the "product_cart_addition_by_link" variable in the hook_link().
I have tried to find the "variable_set", but as I see, it is not in the code.

I think, it would be good to add a checkbox in the "admin/ecsettings/store" page, which controll this variable. If you agreed, I would do it, and I would create a patch.

Comments

foripepe’s picture

I have noticed that in ec_buynow.module, the ec_buynow_link() has 2 ifs:

  if ($type == 'node' && isset($node->ptype) && variable_get('product_cart_addition_by_link', TRUE)) {
...
    if (!variable_get('product_cart_addition_by_link', TRUE) ||
        ec_product_attributes_get($node, 'use_product_cart_form') === TRUE || $node->hide_buynow_link) {
      return;
    }
  }

Because the first variable_get('product_cart_addition_by_link', TRUE) has to be TRUE, the second if first part is always FALSE. So that is not necessary:

  if ($type == 'node' && isset($node->ptype) && variable_get('product_cart_addition_by_link', TRUE)) {
...
    if (ec_product_attributes_get($node, 'use_product_cart_form') === TRUE || $node->hide_buynow_link) {
      return;
    }
  }
gordon’s picture

Status: Active » Fixed

This has been fixed for a while.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.