Site logo

Archived topic

Sticky add to cart at composite products

43 replies · Started by roadlink on April 8, 2021

Viewing posts 16–30 of 44

Glad you got it sorted. Thanks for letting us know :)

Hi Tom,

I am not sure if you have time to check this case.
Somewherewarm, whom developes composite products plugin acquired by automattic. They are part of team now and composite products become kind of official plugin.

So maybe you may think to add official support for sticky add to cart option for composite products :)

Why I open this topic again now;
Because I realized that there is php notice with our code. "Undefined variable: quantity_buttons"

Hi there,

Any chance you can paste the function outside the private field so you can highlight it and click the "CODE" option in the editor here? That will make it readable for me.

Thanks!

Of course, here it is.
I guess it start with line 79 on php file.

To prevent that notice, replace this:

if ( generatepress_wc_get_setting( 'quantity_buttons' ) ) {
    $quantity_buttons = ' do-quantity-buttons';
}

With this:

$quantity_buttons = '';
if ( generatepress_wc_get_setting( 'quantity_buttons' ) ) {
    $quantity_buttons = ' do-quantity-buttons';
}

Hi Tom,

Thanks a lot. That solved the notice issue.

Do you have any plan to make GeneratePress be compatible with Composite products?
I don't want to push your or your team. I don't know how busy you are or what are your priorities right now.

These are issues as far as I know. Just fyi.
Sticky add to cart issue
Disappear add to cart, price and QTY areas from regular place.

Hi there,

Right now it's not a priority, but if there is a complete list of issues we can definitely look into it and plan some fixes (if necessary from our side) for the next couple of GPP releases.

Thanks!

Frankly speaking the main problem is sticky add to cart and quantity buttons. Even we have customized code, we have issues.

1. There is no sticky add to cart for composite products at all.
2. When we make it via a code, QTY buttons are not looking well. Screen shot 1.
3. We duplicate composite products' add to cart button to original place, but again has issue with QTY buttons there. Screen shot 2.

2 and 3 have this issue Even customize > layout > woocommerce > display quantity button is choosen. https://prnt.sc/N2jE-LN1f9K8

Strange, are these new issues or was your developer never able to fix them?

What would be great is if we could have WP admin and sFTP access to a staging site with the plugin installed and the problem right in front of us. That would allow us to debug quickly and hopefully provide a quick solution.

Let me know :)

Hi Tom,

I guess they were old. We were not allowing to place more than 1pcs before so we didn't realize.

This code from David helped for sticky add to cart buttons.

.woocommerce-checkout .do-quantity-buttons div.quantity {
    display: flex !important;
}

Just to confirm, this line:

$quantity_buttons = ' do-quantity-buttons';

Can you make sure that empty space before "do" still exists on your site?

You can see here that it's missing: https://www.screencast.com/t/zyhx6PrrVeb4

My guess is that's why things are acting up.

Let me know :)

Yes you are right. I "fixed" it because i thought it is typo.

When I checked show QTY buttons, now stick add to cart is OK.

Our code copies the add to cart and QTY from composite product and adds it to default location (normally composite products plugin removes original qty and add to cart).
QTY - and + are still an issue there but it is not important.
thanks for great help.

I hope you can support it in future officially.

I'll definitely play with it to see if there's something we can improve on our end to add to future compatibility.

Thanks!

Hi @Tom,

did you able to find chance to check this issue?

regards

This archived topic is closed to new replies.