我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

woocommerce自定义添加到购物车按钮

I am working on a project where customers can buy a product or send it as a gift. In the product page I need two buttons, one for buy and the other one for gift. Clicking one of the two buttons, it will add the product to the cart, then in the cart I have to distinguish which one is a buy product and which one is a gift product.

The problem is that I am not able to catch which one of the two buttons is clicked and how to keep this value (and where) and show it in the cart.

Any idea?

thanks

近期文章

  • 简单的MySQL查询显示错误
  • 如何使用Union all或任何新解决方案组合3个查询
  • 显示来自concat mysql和php的图像
  • 在Laravel中处理不同类型的用户角色
  • 如何将多个Checkbox填充到数据库?
  • 让PHP在WAMP中使用Apache(升级时)
  • 如何在ORACLE SQL PROCEDURE中操作“if condition”?
  • 来自Google Storage / Google App Engine的LOAD DATA LOCAL INFILE?
  • 一般错误:1215无法添加外键约束laravel 5.3
  • 我如何将所选值列为选定值和其他值作为listin php foreach循环
  • 表3列循环
  • 删除ASCII图稿
  • 注意:当从数组值动态调用方法时,数组到字符串转换
  • fb使用codeigniter登录
  • 从购物车代码中删除不起作用
  • 从PHP导出有趣的错误
  • PHP读取ATOM + XML结构
  • 购物车和结帐页面上的自定义运输部分未显示在woocommerce电子邮件模板中
  • PHP MYSQL PDO INSERT加入或如何?
  • 我下载文件时,Google Chrome会显示错误

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华