• Resolved TheStingPilot

    (@thestingpilot)


    Hello,

    It was needed to modify the file ic-cart.php. I copied the one that is found in .\wp-content\plugins\ecommerce-product-catalog\modules\cart\includes\cart to .\wp-content\themes\sydney-child\implecode and made the required change. But the change was not effective. ??

    The only way to get this solved was to edit the file .\wp-content\plugins\ecommerce-product-catalog\modules\cart\includes\cart\ic-cart.php directly.

    I do not know if this is by design or a bug. Anyway, I would like to mention this.

    With kind regards,
    Willem-Jan

    • This topic was modified 2 years, 2 months ago by TheStingPilot.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ndre

    (@ndre)

    Hi @thestingpilot,

    The mentioned file is not a template. This is why such an overwriting is not possible.

    What are you trying to change there?

    Please note that changing the files directly is not recommended. It will prevent you from any future updates, or it will overwrite your changes.

    Thread Starter TheStingPilot

    (@thestingpilot)

    Hello @ndre ,

    Thanks for your reply. I want to add the class notranslate to avoid the name of a cart item being translated. So I used grep to find where td-name is used:

    grep -i -r --include=\*.php td-name -l .

    So I decided to modify the file to achieve this.

    Is there another way to achieve this?

    With kind regards,
    Willem-Jan

    Plugin Author ndre

    (@ndre)

    Hi @thestingpilot,

    You can use the following custom PHP code to add a custom class to the cart product name container:

    add_filter('cart_summary_product_name_td', 'my_cart_summary_product_name_td');
    
    function my_cart_summary_product_name_td($html) {
    return str_replace('"td-name"', '"td-name your-class"', $html);
    }

    You should replace ‘your-class’ with the class name needed.

    Thread Starter TheStingPilot

    (@thestingpilot)

    Hello @ndre ,

    Thanks for your response. In what file do I add that custom PHP Code?

    With kind regards,
    Willem-Jan

    Plugin Author ndre

    (@ndre)

    Hi @thestingpilot,

    You can add it to your child theme functions.php or even better as a mu-plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need to modify ic-cart.php’ is closed to new replies.