如何在购物车Woocommerce中显示类别?

时间:2018-02-12 12:19:10

标签: wordpress woocommerce

关于Woocommerce的问题。在购物车中需要将产品分成几类。例如......

第1类

产品1 - 10美元。

产品2 - 20美元。

第2类

产品1 - 10美元。

产品2 - 20美元。

有一个变体Private Sub Commande92_Click() Dim vStatusBar As String Application.SetOption "Show Status Bar", True vStatusBar = SysCmd(acSysCmdSetStatus, "Mise en page des feuilles EXCEL ... veuillez patienter.") Dim xlApp As Excel.Application Dim xlSheet1 As Excel.Worksheet Dim xlBook As Excel.Workbook Dim sSheet As String, Rep1 As String, LaDate As String, MoisDate As String, StTarget As String, Sql1 As String Dim thedb As DAO.Recordset LaDate = Now() MoisDate = Format(LaDate, "ddmm") Rep1 = "F:\PELO\PELO 2018-2019\FichiersInscriptionParent\" Sql1 = "SELECT DISTINCT tblEcole.Abvr, tblEcole.NomEcole FROM tblEcole;" StTarget = Rep1 & "EcolePELO" & "_" & MoisDate & ".xlsm" Set xlBook = GetObject(StTarget) 'filename is the string with the link to the file ("C:/....blahblah.xls") Set xlApp = GetObject(, "Excel.Application") On Error GoTo 0 If xlApp Is Nothing Then Set xlApp = CreateObject("Excel.Application") End If 'Make sure excel is visible on the screen xlApp.Visible = True xlBook.Windows(1).Visible = True 'xl.ActiveWindow.Zoom = 75 sSheet = thedb(0) 'Define the sheet in the Workbook as XlSheet1 Set xlSheet1 = xlBook.Worksheets(1) With xlSheet1 '.Name = "Modele" .Select "Modele" .Rows("1:2").Select .Copy .Name = sSheet .Select sSheet .Rows("1:1").Select '''' ' Bloc ici '''' .PasteSpecial **Paste:=xlPasteColumnWidths**, Operation:=xlNone, _ SkipBlanks:=True, Transpose:=False .Range("B3").Select .Application.CutCopyMode = False .Selection.Copy .Range("B1:N1").Select .ActiveSheet.Paste .Range("A3:B266").Select .Application.CutCopyMode = False .App End With xlSheet1.aActiveSheet.Sheet (1) ' xlApp.ActiveSheet.Name = "Modele" xlSheet1.Sheets("Modele").Select xlSheet1.Application.ActiveWindow.SelectedSheets.Delete , True xlBook.Save , True xlBook.Close xlApp.Quit Err_MCommande92_Click: vStatusBar = SysCmd(acSysCmdClearStatus) MsgBox Err.Number & " - " & Err.Description Resume Exit_Commande92_Click Exit_Commande92_Click: vStatusBar = SysCmd(acSysCmdClearStatus) End Sub 但问题是在每个产品之前显示类别:

第1类

产品1 - 10美元。

第1类

产品2 - 20美元。

帮助解决此问题。谢谢!

代码cart.php:

<? Php echo $ _product-> get_categories (); ?>

0 个答案:

没有答案