shopping-cart

Add a CSS class to an item when Woocommerce cart is empty

一笑奈何 提交于 2019-12-12 10:00:55
问题 I am trying to hide my cart when it is empty, so I decided to add a CSS class to the cart HTML item when the cart is empty, here is my current code: function x_woocommerce_navbar_menu_item( $items, $args ) { if (WC()->cart->cart_contents_count == 0 ) { echo '<script type="text/javascript"> $(document).ready(function() { $("#header_cart").addClass("zero"); }); </script>'; } I am adding this to my functionts.php file Am I missing anything? 回答1: It will be good if you add the class to body to

Anybody ever used PayPal Website Payments Standard with SESSION variables?

流过昼夜 提交于 2019-12-12 09:23:36
问题 Note: Our site is built in PHP and uses MySQL databases. I already manage another site with shopping cart in its entirety using Authorize.net so please dont respond with suggestions to use another provider. A new product/service we are releasing is classified as "High Risk" to the merchant providers and they want to charge us out the a**. In response, I figured setting up a Website Payments Standard account on Paypal.com was the best alternative for the following reasons: 1) no monthly

advice on implementing a shopping cart using playframework

怎甘沉沦 提交于 2019-12-12 08:33:05
问题 I am learning to use playframework by writing code to implement a webstore for selling items.I have implemented the Admin area using the crud and secure modules.Now, I want to create a shopping cart to which a user can add items and proceed to checkout . My knowledge of ecommerce is minimal,but I had gone through some textbooks which implement shopping carts and some webshop functionality using servlets .In the books ,the cart used to keep a Set of CartItem s ,each of which contained an

I know how to send information from Form1 to Form2, but how do I edit it and send it back if the data is contained in a List<T> in Form1?

耗尽温柔 提交于 2019-12-12 04:38:45
问题 I have this code to send it from Form1 to Form2: public partial class Form1 : Form { public ShoppingBasket myBasket = new ShoppingBasket(); public Form1() { InitializeComponent(); } private void editButton_Click(object sender, EventArgs e) { int c = lstCart.Items.Count - 1; for (int i = c; i <= 0; i++) { if (lstCart.GetSelected(i)) { Form2 fm2 = new Form2(); fm2.productNameTextBox.Text = myBasket[i].ProductName; fm2.quantityTextBox.Text = Convert.ToString(myBasket[i].Quantity); fm2

Magento - Override the tablerate resource model

半城伤御伤魂 提交于 2019-12-12 04:13:07
问题 I have read through the various threads on here however i can still not get the following problem resolved. I am attempting to override a resource Model using the method below, however i am having no luck at all. Magento Version: 1.7 I would like to rewrite the the Mage_Shipping_Model_Resource_Carrier_Tablerate class found at: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate I have copied the file too: app/code/local/me/Shipping/Model/Resource/Carrier/Tablerate.php and renamed the

Adding all quantity of a specific lbc_type in cart

三世轮回 提交于 2019-12-12 03:04:13
问题 i need to add all the quantity of all the product in the cart that have a lbc_type = pouch. example: add to cart apple(lbc_type = pouch) user inputted quantity 2 add to cart orange(lbc_type = box) user inputted quantity 2 add to cart grapes(lbc_type = pouch) user inputted quantity 3 so i should get all the product in cart that have lbc_type = pouch then sum up all the quantity which based on the example the overall quantity of lbc_type = pouch is equal to 5. Because apple have quantity 2 and

sending data to payment gateway and back - possible problems

本秂侑毒 提交于 2019-12-12 02:21:33
问题 I'm going to use one of the payment gateways and so users from my site will be redirected to gateway hosted page to provide all the CC details. Gateway will return results to the page which I specify (lets call it paymentProcessed.php). But now my worry is that: someone might fake it. What I mean is that someone might be redirected to payment gateway, then instead of paying, will return results to my site paymentProcessed.php page with confirmation that all has been payed. This confirmation

Disabling checkout button from shopping cart - php

蹲街弑〆低调 提交于 2019-12-12 01:23:34
问题 I am trying to setup a “view shopping cart/basket” page within a site in which logged in users earn points/credits. Once they earn a certain amount of these points they can then go to a shopping cart and pay with these points only. (No money changes hands, so no paypal/checkout/shipping/taxes etc are involved) So far I have got the login, points total table, add product to cart and change of quantity feature to work. What I am trying to do on this ‘view_cart.php’ page (code below) is to make

Unset session variable on button click event

给你一囗甜甜゛ 提交于 2019-12-12 01:06:33
问题 I can't unset a session variable properly using a "remove button" click. I have two pages: product page and shopping cart page , but problem is that I have a "remove button" in the shopping cart which is not working properly. When I click on "remove button" it should run unset($_SESSION['product1'] . But when I select another item then it can display "previous session item" so it means remove button does not run unset($_SESSION['product1'] properly. How do I solve this issue? Product Page

Zen cart: I would like to query from a specific category its products name, price, image, description, and attributes

天大地大妈咪最大 提交于 2019-12-12 00:36:24
问题 I am using the following query: <?php // retrieve products from database global $db; $q1 = $db->Execute("select * from products"); $q1_items = array(); $q2_items = array(); while (!$q1->EOF){ $q1_items[] = $q1->fields; $q1->MoveNext(); } foreach ($q1_items as $item => $items) { echo '<p><a href="index.php?main_page=product_info&products_id='. $items['products_id'] .'"><img src="images/'. $items['products_image'].'" alt="'. $items['products_name'].'" title="'. $items['products_name'].'" /></a>