Search Results

Search found 802 results on 33 pages for 'zen cart'.

Page 7/33 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Disable Link while animated Basket

    - by Dante
    Hi, I'm using this script for my online shopping basket: http://www.webresourcesdepot.com/fly-to-basket-effect-with-jquery/. Like people suggest in the comments it's easy buggy when you click multiple times on the same image. How can I disable the img link when it's clicked once and re-enable it when the product is added to the basket? I've tried setting the attribute HREF of to # in the beginning of the function, but that doesn't help. So when a user clicks the function needs to be executed, but the link should be disabled as long as the function is busy. thanks in advance for your help.

    Read the article

  • Existing web-site CSS replacement (re-skinning) best-practices without changing the HTML

    - by Enigmativity
    I can see a number of other good answers to questions relating to CSS best-practices on stack overflow: How to Manage CSS Explosion CSS Conventions / Code Layout Models Are there any CSS standards that I should follow while writing my first stylesheet? What is the best method for tidying CSS? Best Practices - CSS Stylesheet Formatting But I think I have a different problem. I'm trying to "re-skin" an existing site that has been nicely built using div's and ul's, etc, and it has a good existing CSS file, but when I start making changes to the CSS I quickly find that I break the layout. My feeling is that it is very hard to get a feel for how all the CSS will work together and indeed what CSS is affecting parent and sibling elements in the HTML. So, my question is "what are the best-practices around re-skinning an existing web-site by replacing the CSS only and not modifying the existing HTML?" I can't change the classes, ids, node hierarchy, etc. An example of the particular site that I am trying to re-skin is http://demo.nopcommerce.com/. The existing CSS can be as complicated/detailed as this extract from the main CSS file: .header-selectors-wrapper { text-align: right; float: right; width: 500px; } .header-currencyselector { float: right; } .header-languageselector { float: left; } .header-taxDisplayTypeSelector { float: right; } .header-links-wrapper { float: right; text-align: right; width: 570px; } .header-links { border: solid 1px #9a9a9a; padding: 5px 5px 5px 5px; margin-bottom: 5px; display: inline-table; } .order-summary-content .cart .cart-item-row td, .wishlist-content .cart .cart-item-row td { border-bottom: 1px solid #c5c5c5; vertical-align: middle; line-height: 30px; } .order-summary-content .cart .cart-item-row td.product, .wishlist-content .cart .cart-item-row td.product { text-align: left; padding: 0px 10px 0px 10px; } .order-summary-content .cart .cart-item-row td.product a, .wishlist-content .cart .cart-item-row td.product a { font-weight: bold; } Any help would be appreciated.

    Read the article

  • Anyway that I can get the values of a PHP array through ajax?

    - by Jerry
    Hi All, I am trying to build a shopping cart site. When a user click add to cart image on the product page, The product title will show a "The product is in your cart" text without reloading the page. I am using session and ajax but no luck so far. I appreciate any helps. My html cold <table id="<?php echo $productId; ?>" width="594" border="0" cellpadding="5" cellspacing="0"> <tr> <td><img src="<?php echo "$brandImage"; ?></td> <td <?php echo $productName; ?> //The "The product is in your cart" will be showed here</td> </tr> <tr> <td><a class="addToCart" href="javascript:void(0);" onclick="addToCart(<?php echo $productId?>)"> </td> My Javascript file (addToCart.js) function addToCart(productId){ var url="addToCart.php"; url=url+"?productId="+productId; url=url+"&sid="+Math.random(); $.post( url, function(responseText){ alert(responseText); //I wish I can get productData value from addToCart.php }, "html" ) My php file (addToCart.php) <?php SESSION_START(); $productId=$_GET['productId']; $cart=$_SESSION['cart']; if(isset($cart)){ $cart.=",".$productId; $product=explode(',',$cart); $totalItem=count($product); }else{ $cart=$productId; $totalItem=1; }; $productData=array(); foreach($product as $id){ $productData[$id]=(isset($productData[$id])) ? $productData[$id]+1 :1; }; $_SESSION['cart']=$cart; //print_r($productData); echo $productData; //Not sure what to do to send $productData back to my addToCart.js variable ?> I tried to make the code look simple. Any suggestion will be a great help. Thanks

    Read the article

  • after_create :create a new line in DB

    - by Karl Entwistle
    Hey guys I was wondering if anyone could help me with an issue im having, basically id like to have Account.create after a PayPal notification is received, There is a simple cart model which corresponds to line_items within the cart so add_account_to_market would look like this in pseudo code def add_account_to_market if status == "Completed" find the line items(via cart_id) that correspond to the cart.id that just been paid create an account with user_id set to the current carts user id end end Ive never tried to do something like this in Rails and its not working, Ive been pulling my hair out all night trying to fix this, hopefully someone can help or point me in the right direction. Thanks :) class PaymentNotification < ActiveRecord::Base belongs_to :cart serialize :params after_create :mark_cart_as_purchased after_create :add_account_to_market private def mark_cart_as_purchased if status == "Completed" cart.update_attribute(:purchased_at, Time.now) cart.update_attribute(:paid, true) end end def add_account_to_market if status == "Completed" l = LineItem.find(:all, :conditions => "cart_id = '#{cart.id}'") for l.quantity Account.new(:user_id => cart.user_id) end end end end PS mark_cart_as_purchased method is working fine, its just the add_account_to_market im having issues with.

    Read the article

  • php adding value to session

    - by antikbd
    I am trying to implement a 'shopping cart' where, if the 'Add to Cart' has been clicked, the respective item is either added to the cart or incremented by one if already present. However, the following code isn't working and giving me a "Cannot use a scalar value as an array" error. Any help would be highly appreciated. if (isset($_POST['fan']) && ($_POST['fan']=="Add to Cart")) { if (($_SESSION['cart']['fan']==0) || (!isset($_SESSION['cart']['fan']))) { $_SESSION['cart']['fan']=1; } else { $_SESSION['cart']['fan']++; } }

    Read the article

  • Newbie question: undefined local variable or method , why??

    - by Mellon
    I am new in Rails (I am using Rails 3.0.3), currently I am following the book "Agile Web Development with Rails" to develop a simple rails application. I followed the book to: --create a model 'Cart' class; --implement 'add_to_cart' method in my 'store_controller', I have a line of code <%=button_to "Add to Cart", :action => add_to_cart, :id => product %> in my /store/index.html.erb As you see, there is :action => add_to_cart in my index.html.erb, which will invoke the add_to_cart method in my *Controllers/store_controller.rb* But after I refresh the browser, I got the error "undefined local variable or method 'add_to_cart'", apparently I do have the method add_to_cart in my 'store_controller.rb', why I got this error??? What is the possible cause??? Here are my codes: store_controller.rb class StoreController < ApplicationController def index @products = Product.find_products_for_sale end def add_to_cart product = Product.find(params[:id]) @cart = find_cart @cart.add_product(product) end private def find_cart session[:cart] ||= Cart.new end end /store/index.html.erb <h1>Your Pragmatic Catalog</h1> <% @products.each do |product| -%> <div class="entry"> <%= image_tag(product.image_url) %> <h3><%=h product.title %></h3> <%= product.description %> <div class="price-line"> <span class="price"><%= number_to_currency(product.price) %></span> <!-- START_HIGHLIGHT --> <!-- START:add_to_cart --> **<%= button_to 'Add to Cart', :action => 'add_to_cart', :id => product %>** <!-- END:add_to_cart --> <!-- END_HIGHLIGHT --> </div> </div> <% end %> Model/cart.rb class Cart attr_reader :items def initialize @items = [] end def add_product(product) @items << product end end

    Read the article

  • How do online stores handle 2 customers that add the last item to their cart?

    - by Alex
    I'm making a store web app for a college class. I'm wondering what do stores like Amazon do when there is only 1 item left? Do they let multiple customers add the last item to their cart, and whoever checks out first gets it? Meaning that the inventory database is updated after purchase. or Do they let only one customer add the last item to their cart and remove the item from the inventory. If the customer's session times out, then the item is put back in the inventory.

    Read the article

  • XCart Skip Checkout Steps

    - by user900553
    I am using xcart. In the checkout process, skip the step that appears after a customer clicks the add to cart button on the product page. It takes them to a page that shows the product and the text Added to your shopping cart. I want to take them directly to the view cart page, right before the checkout page. I also tried: Enable Redirect customer to cart after adding a product option in X-Cart admin back-end -Settings - General settings. Still not working. Anybody have Idea about this?

    Read the article

  • How to establish the real-time communication between Shopping cart running MySQL and Internal System Running PostgreSQL [closed]

    - by Andrew
    I am thinking about the way of establishing some-sort of real-time connection between MySQLpowered shopping cart and internal system that is running on PostgreSQL. Could you give me some sort of insight on this topic? For example, I can write some sort of csv export application, then enable remote MySQL for over the internet connection and then import csv to mysql directly from PC. Or upload csv and run cron on server. But this way of import-export causing delays; so I would like to link databased (or some msort). I have never done it before and would like to hear some opinions about this. Another way "just a thought" might to implement triggers that would initiate the update process via csv; but again, I would like to avoid csv. Do you have any good advise? Maybe some specific examples?

    Read the article

  • Arbitrary attributes error with has_one association and Factory Girl

    - by purpletonic
    I'm trying to build a basic shopping cart for a Rails app I'm working on. Nothing special, - the shopping cart has many line_items - each line_item has_one product associated and a quantity with it class Cart < ActiveRecord::Base attr_accessible :line_items has_many :line_items, :dependent => :destroy end class LineItem < ActiveRecord::Base attr_accessible :quantity, :product belongs_to :cart has_one :product end I'm trying to use RSpec to test this association, but i'm doing something wrong as I'm getting an error that says: DEPRECATION WARNING: You're trying to create an attribute 'line_item_id'. Writing arbitrary attributes on a model is deprecated, and I'm not sure why. In my factories.rb file I'm defining the line_item factory as follows: factory :line_item do quantity { Random.rand(1..5) } product end factory :cart do factory :cart_with_two_line_items do ignore do line_item_count 2 end after(:create) do |cart, evaluator| FactoryGirl.create_list(:line_item, evaluator.line_item_count, cart_id: cart) end end end Any pointers where I'm going wrong, it's probably something basic, but I'm still quite new to Rspec. Thanks in advance.

    Read the article

  • How to create a reusable Asp.Net Mvc application?

    - by Amitabh
    We have multiple Asp.Net WebSites each running on IIS. Site1 : http://www.Site1.com/ Site2 : http://www.Site2.com/ We have to implement Shopping Cart functionality for each of the above WebSites. For each web site the corresponding shopping cart should work on the following Url. Shopping Cart for Site1 : http://www.Site1.com/shop/cart Shopping Cart for Site2 : http://www.Site2.com/shop/cart We want to develop the Shopping Cart application using Asp.Net MVC 2.0. But it should be reusable in both the above sites.

    Read the article

  • Controller should not have domain logic. How faithful should one adhere to this tenet?

    - by Hao
    Quoting from page 49 of Pro ASP.NET MVC book It is certainly possible to put domain logic into a controller, even though you shouldn’t, just because it seems like it will work anyway. It’s easy to avoid this if you imagine that you have multiple UI technologies (e.g., an ASP.NET MVC application plus a native iPhone application) operating on the same underlying business domain layer (and maybe one day you will!). With this in mind, it’s clear that you don’t want to put domain logic into any of the UI layers. Why he seems to contradict himself on page 172? [HttpPost] public ActionResult CheckOut(Cart cart, ShippingDetails shippingDetails) { // Empty carts can't be checked out if (cart.Lines.Count == 0) ModelState.AddModelError("Cart", "Sorry, your cart is empty!"); if (ModelState.IsValid) { orderSubmitter.SubmitOrder(cart, shippingDetails); cart.Clear(); return View("Completed"); } else // Something was invalid return View(shippingDetails); } Related to: How to avoid placing domain logic in controller?

    Read the article

  • Invalid function declaration. DevC++

    - by user69514
    Why do I get invalid function declaration when I compile the code in DevC++ in Windows, but when I compile it in CodeBlocks on Linux it works fine. #include <iostream> #include <vector> using namespace std; //structure to hold item information struct item{ string name; double price; }; //define sandwich, chips, and drink struct item sandwich{"Sandwich", 3.00}; **** error is here ***** struct item chips{"Chips", 1.50}; **** error is here ***** struct item drink{"Large Drink", 2.00}; **** error is here ***** vector<item> cart; //vector to hold the items double total = 0.0; //total const double tax = 0.0825; //tax //gets item choice from user char getChoice(){ cout << "Select an item:" << endl; cout << "S: Sandwich. $3.00" << endl; cout << "C: Chips. $1.50" << endl; cout << "D: Drink. $2.00" << endl; cout << "X: Cancel. Start over" << endl; cout << "T: Total" << endl; char choice; cin >> choice; return choice; } //displays current items in cart and total void displayCart(){ cout << "\nCart:" << endl; for(unsigned int i=0; i<cart.size(); i++){ cout << cart.at(i).name << ". $" << cart.at(i).price << endl; } cout << "Total: $" << total << endl << endl; } //adds item to the cart void addItem(struct item bought){ cart.push_back(bought); total += bought.price; displayCart(); } //displays the receipt, items, prices, subtotal, taxes, and total void displayReceipt(){ cout << "\nReceipt:" << endl; cout << "Items: " << cart.size() << endl; for(unsigned int i=0; i<cart.size(); i++){ cout << (i+1) << ". " << cart.at(i).name << ". $" << cart.at(i).price << endl; } cout << "----------------------------" << endl; cout << "Subtotal: $" << total << endl; double taxes = total*tax; cout << "Tax: $" << taxes << endl; cout << "Total: $" << (total + taxes) << endl; } int main(){ //sentinel to stop the loop bool stop = false; char choice; while (stop == false ){ choice = getChoice(); //add sandwich if( choice == 's' || choice == 'S' ){ addItem(sandwich); } //add chips else if( choice == 'c' || choice == 'C' ){ addItem(chips); } //add drink else if( choice == 'd' || choice == 'D' ){ addItem(drink); } //remove everything from cart else if( choice == 'x' || choice == 'X' ){ cart.clear(); total = 0.0; cout << "\n***** Transcation Canceled *****\n" << endl; } //calcualte total else if( choice == 't' || choice == 'T' ){ displayReceipt(); stop = true; } //or wront item picked else{ cout << choice << " is not a valid choice. Try again\n" << endl; } }//end while loop return 0; //end of program }

    Read the article

  • DNSBL listed at zen.spamhaus.org - cant get outgoing mail working? Am I interpreting the response correctly?

    - by Joe Hopfgartner
    I have problem with a mailserver and there is something I kind of not understand! I can connect, authenticate, specify the sender address - but when specifying the reciever i get a error 550 which looks like so: RCPT TO:[email protected] 550-DNSBL listed at zen.spamhaus.org 550 http://www.spamhaus.org/query/bl?ip=62.178.15.161 Now the strange thing is that 62.178.15.161 is my local client address. Not the servers ip address. Also the error code 550 seems to be defined as so: 550 Requested action not taken: mailbox unavailable To me that makes totally no sense. Why this error code with this spamhaus message? Why the local ip adress and not the servers? There is exim running and there is nothing turning up in the logs mail.err mail.info mail.log mail.warn in /var/log I looked up both the servers and the clients ip adress on blacklists. The clients ip adress is listed on some (as expected), but the server is totally clean. Here is the complete telnet log when I reproduced the error. Mail clients like Evolution and Thunderbird give me the same spamhaus error message. joe@joe-desktop:~$ telnet mail.hunsynth.org 25 Trying 193.164.132.42... Connected to mail.hunsynth.org. Escape character is '^]'. 220 hunsynth.org ESMTP Exim 4.69 Sat, 01 Jan 2011 17:52:45 +0100 HELP 214-Commands supported: 214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP EHLO AUTH 250-hunsynth.org Hello chello062178015161.6.11.univie.teleweb.at [62.178.15.161] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN CRAM-MD5 250-STARTTLS 250 HELP AUTH LOGIN 334 VXNlcm5hbWU6 dGVzdEBodW5zeW50aC5vcmc= 334 UGFzc3dvcmQ6 ***** 235 Authentication succeeded MAIL FROM:[email protected] 250 OK RCPT TO:[email protected] 550-DNSBL listed at zen.spamhaus.org 550 http://www.spamhaus.org/query/bl?ip=62.178.15.161 quit 221 hunsynth.org closing connection Connection closed by foreign host. joe@joe-desktop:~$ Update: I tried the same thing from my other server and could successfully send an email. So it really looks like the server does check the IP wich establiches the connection is in some blacklist. This is theoretically a good thing - but - the authentication on the server should prevent that? Or shouldn't it? Well I just think it would be absurd if I couldn't send email over my smtp server from my dynamic ISP connection because the dynamic is listed, altough i have a clean server with login?

    Read the article

  • Is there a Cart/Catalog app out there that isnt a full site?

    - by prodigitalson
    Every solution i come across seems to be a complete store with far too many options and too much functionality. I can write my own cart to get the minimal functionality i need out of the frontend, im just trying to cut out the time writing a complex backend. What im really looking for is something that offers the backend functionality for a product catalog, order management, etc. while providing a smooth and consistent API to access the data for my completely custom frontend application. The frontend will be in PHP so the API would have to be native PHP or some kind of web service interface i can create my own php models around. It would need to run on a LAMP stack and would preferably be written in PHP, Python, or Ruby just in case i need to customize the backend (she curently has ZenCart and hates it - says its far too complicated and sophisticated for her needs). Does such a thing exist? Or what would be the next best thing?

    Read the article

  • When loading shopping cart in Magento with a new Payment module, I get an error I haven't been able

    - by Joseph
    I am trying to add a new payment module into Magento. However, even after commenting out the vast majority of the code, I still get the following error: Fatal error: Call to a member function isAvailable() on a non-object in /var/www/html/app/code/core/Mage/Payment/Helper/Data.php on line 71 I am using Magento 1.4.0.1, and have disabled the cache. I even emptied the cache several times just in case. The only code currently not commented out is based on the tutorials here and here. The error occurs when the cart is loaded either from the administration area or the front end. Is there anyone out there that has run into a similar issue? I would post code, but I am not sure what needs to be posted. Thanks for the assistance.

    Read the article

  • How do I create a Magento module or widget that will appear on the shopping cart page?

    - by user303449
    I’m having a lot of trouble understanding how to create a module that will add an extra button to the shopping cart page. I found lots of info on payment modules and stand-a-lone page modules, but nothing for this. I simply need to add a button underneath the regular “Checkout” button that can post item data to another website. I’ve created a module but can’t get Magento to recognize it and display the button on that spot. Any help would be greatly appreciated, even just sending me to an existing tutorial that I haven’t been able to find. Thanks.

    Read the article

  • How to add theme settings to Zen-based themes?

    - by barraponto
    I'm trying to place my own theme settings into a drupal subtheme. i've used the forms API in theme-settings.php but they are not showing up in admin/build/themes/settings/$mytheme. my theme-settings.php is uploaded here in case you'd like to see it. what it does is choose vocabularies for categories and tags, making it easier to port wordpress blogs to drupal.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >