dongqiang8058 2018-12-21 11:13 采纳率: 100%
浏览 23

隐藏特定属性值或变体的“添加到购物车”按钮

I search a solution to hide add to cart button for variations with a specific selected value for one of attributes. We have two types of variations (Offene Schulung and Individuelle Schulung) for all our products. And we show the add to cart button and an "Request a Quote" Button - coming from Yithemes "Request a Quote" plugin. Problem was that only for the first variation (Offene Schulung) should show both Buttons. For the Individuelle Schulung should only the request a quote Button shown.

I found the solution to hide a button related to attribute value over purchasable: Link

These hides perfectly the button, but it means that my used Plugin YiThemes request a quote think's that the variation is not purchasable and creates an empty offer.

So my idea was to add around the add to cart Button a specific ID or CSS class related to the attribute value. With these i could hide the button with an css "display:none".

But till yet if found no method to do that.

Taxonomy was 'pa_trainingsart' and the term_name was 'Individuelle Schulung'.

Try to use a lot of scripts and functions.php samples form StackOverflow, but till yet without any results

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么