• Resolved Dademaru

    (@xendo)


    Hello,

    first, thanks for your plugin.

    I wonder if it’s possible to override /public/templates as for WooCommerce (or other plugins) templates.
    It would be very useful.

    For example to add theme classes to buttons or titles in available-gifts.php template.

    Or to remove custom actions added in theme for single product template I don’t want to hook in giftable-variations.php / cart.
    E.g., since I moved price below summary:

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 25 );

    I need to add:
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 25 );
    to giftable-variations.php template
    or to remove other custom actions added in theme for single product template I don’t want to hook in giftable-variations.php.

    Thanks,
    Davide

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author DecomTeam

    (@decomteam)

    Hi @xendo, it would be easier to style a couple of things than to edit PHP files.
    You can use ready classes and apply your style there (you need to style 3 things: Image, Title, Button)

    – wrappers

    .dgfw-available-gifts {}
    #dgfw-choose-gift {}

    – title
    .dgfw-available-gifts-title {}

    – description
    .dgfw-available-gifts-description {}

    – carousel (items wrapper)
    #dgfw-gifts-carousel {}

    – item
    .dgfw-gift {}
    – item thumb
    .dgfw-gift-thumbnail product-thumbnail {}
    – item name
    .product-name {}

    – button (select or add to cart)
    .dgfw-gift button.button {}

    • This reply was modified 6 years, 1 month ago by DecomTeam.
    Thread Starter Dademaru

    (@xendo)

    Hi @decomteam,

    thanks for your reply.
    The need to style buttons or titles was an example.
    It would be great to override templates to customize the layout further.

    And for custom actions (or WC actions with different priority) I must override your plugin files (which is not update friendly).

    Isn’t it possible to allow template override as for WC (or several other plugins)?
    Or to add hooks (actions or filters) to customize templates without template override?

    Thanks,
    Davide

    Plugin Author DecomTeam

    (@decomteam)

    Hi @xendo, I still think that for experienced WebDev person that should be quick (copy/paste) CSS thing, than for us to integrate new hooks/filters or template overwrites (that takes time, testing – and we don’t have a lot of free time for that)

    – I will put your request to idea board but not sure will it be integrated.

    Thread Starter Dademaru

    (@xendo)

    Hi @decomteam,

    let’s forget the problem of adding CSS classes:
    I just wondered if it was feasible for you to allow template override or at least add some hooks (apply_filters) for buttons or titles classes.
    If there is no interest in this, no problem, I will add further CSS to format your plugin templates.

    As for removing actions with different priorities or other custom actions added, I didn’t get any response so I suppose it’s a NO.

    Anyway thanks,
    Best,
    Davide

    • This reply was modified 6 years ago by Dademaru.
    Plugin Author DecomTeam

    (@decomteam)

    Hi @xendo, the main issue with filters and hooks/actions is that we don’t have a lot of free time to invest in coding+testing+coding right now, so no real plans for extra filters etc.. You can always take a look at code and try to extend

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Template override’ is closed to new replies.