Page 2 of 17 FirstFirst 123412 ... LastLast
Results 11 to 20 of 166
  1. #11
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Thanks for all your feedback, Possum, Kuroi, and of course Moderator

    I had a look at the buy now -> shopping cart vs buy now -> product info issue.
    It does not have any thing to do with the Edit Cart mod. If you add a product with no attributes to your catalog, then hit the buy now button, I am pretty sure it will take you to the cart.

    When a product has attributes, even clicking a buy now button, you get taken to the product info page. It seems to be by design, even when the product is not priced by attributes.

    I had a little look at what it might be, but couldn't see it. I can only tell you where I would start to look. You should look at includes/main_cart_actions.php to find the name of the action that your buy now button is calling, and you should see there the corresponding function of the classes/shopping_cart.php that is being called. Then if you step through the logic in that class, my guess is that it will have some kind of check if the attributes have been set or not.

    But it could be that if the product has attributes, it needs to have values for each attribute passed in when adding to cart. Because subsequent logic matches DB/product/attributes with Cart/Products/attribute_values.

    Hopefully somebody more knowledgable will spot this post

    Justin

  2. #12
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Editing cart contents -- esp products with attributes

    Quote Originally Posted by possum View Post
    I do not have any mandatory attributes, so I'd like to be able to allow customers to add the product to their cart directly from the product listing without going via the info page.
    This is unrelated to the Edit Cart mod, insomuch as the two sets of functionality are separate issues. It probably warrants a dedicated thread ... perhaps it should be resurrected in your other thread related to editing cart contents.
    Granted, your point that the Edit Cart mod is useful to fine-tune things after-the-fact is noted.

    If you want to add attribute-connected products from the product-listing page, you'll need to change the way the product-listing page adds products to the cart. You'll need to add the extra input fields for attributes into the product-listing page so that they can be selected from there. This means you'll need to turn the single-form-page into a multiple-form-page ... which changes the page layout logic significantly ... almost completely.

    You said that none of *your* products require the selection of any attributes. I suspect that the number of sites using entirely optional attributes in all cases would be slim. Justin's right that to do this you'd have to alter the shopping_cart class to break its safeties around adding products to cart without any attributes being selected when attributes are assigned to the product. There may be dangerous caveats to that ... caveats which could be different for each type of attribute that could be assigned.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    That being said, I think you will need to go in a different direction to achieve your aim, Possum.

    I wonder if "Gift Wrapping" couldn't be a separate product? I don't know what you are selling, but what if someone buys 2 or three different items? Then selecting a gift wrapping attribute for each of them might be nonsensical anyway.

    Well if you really want to do it, I would change the code for the buy now button on the product listing page. How about changing it such that it submits the same information as the add_product action of the cart_quantity form on the product info page? You would need to hard code hidden parameters for the quantity, gift wrapping attribute at least, into the buy now button code.

    Good luck

    Justin

  4. #14
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Editing cart contents -- esp products with attributes

    I think Justin is hitting the nail on head. In my experience when people start talking about optional attributes, often what they are talking about turn out to not be attributes of the products themselves, but separate products or services that are added to the base product. I see this particularly in the situation where people are struggling to work out appropriate stock levels by attribute for additional services such as installation or gift wrapping where it becomes very clear that the stock is in no way related to that of the product to which the service is being applied.

    Under these circumstances there are a range of add-ons that can be usefully applied such as cross-sell, better together and the more specific gift wrapping mods.

    In the other case that possum has quoted elsewhere, name, attribute heavy products such as computer configurations, it seems likely that most if not all the attributes would be mandatory, even if to opt not to include them in the specific configuration being built. Under these circumstances, I would really heed Dr Byte's advice. Breaking the validation built into the cart on the basis that a customer can go back from the shopping cart to actually select preferred attributes would be a recipe for disaster.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #15
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Editing cart contents -- esp products with attributes

    Hi Justin,

    Thanks for the great mod! I think it should be integrated into the core code at some point.

    Could you tell me how you added the [click to edit] to the item name field in the cart? Does this come up for every product, with or without attributes? If so, can you modify it so that it only shows on those listings that have attributes that someone might want to go back and change?

    Thanks!!

    Matt

  6. #16
    Join Date
    Sep 2007
    Posts
    58
    Plugin Contributions
    0

    Default Re: Editing cart contents -- esp products with attributes

    ** changed mind - post deleted **

  7. #17
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Hi lankeeyankee

    Quote Originally Posted by lankeeyankee View Post
    Could you tell me how you added the [click to edit] to the item name field in the cart? Does this come up for every product, with or without attributes? If so, can you modify it so that it only shows on those listings that have attributes that someone might want to go back and change?
    Yes that is a good idea. Actually I have not changed the shopping cart at all in the mod. On my own site, I added the text [click to edit] but it is just text, there is no logic.
    Code:
    <a href="<?php echo $product['linkProductsName']; ?>"><div id="cartImage" class="back"><?php echo $product['productsImage']; ?></div><div id="cartProdTitle"><?php echo $product['productsName'] . '<br />[click to edit] <span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></div></a>
    But there is not much need to edit a product with no options, it is true. And at present the edit product page does not even have a quantity field that the user can edit.

    Adding the logic to the shopping cart/product_info page to distinguish between cart items with attributes and those without is not such a big job. But I won't be able to do it for a wee while (a week or two). But that will be next change I make. Unless you feel like doing it

    Justin

  8. #18
    Join Date
    Sep 2006
    Posts
    101
    Plugin Contributions
    0

    Default Re: Editing cart contents -- esp products with attributes

    Hey - great mod. I have a shop which allows/requires customers to enter personal text for their item. Often they may spot a typo at the last minute.

    I noticed that with "Return to cart" turned off, after the client has edited the attributes, they come back to the product for more editing, but the attribute fields don't repopulate. Anybody else noticed this?

    Could you redirect the "update product" button to point back to the shopping cart in this instance?

  9. #19
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Hey solarflare

    Off the top of my head, forcing the update product button to override the "Return to Cart setting" and go off to the shipping cart, sounds a bit tricky.

    I won't be able to look at it though, for a few days. But I will look at it and report back. It would certainly be better if the attribute settings properly reloaded.

    Justin
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  10. #20
    Join Date
    Jul 2006
    Posts
    213
    Plugin Contributions
    0

    Default Re: Editing cart contents -- esp products with attributes

    I installed the Edit Cart mod. I used WinMerge and simply added the "Edit Cart Mod" block to my tpl_product_info_display.php file because it was heavily modded to Tabbed Product Display. I noted that the "[click to edit] button did NOT appear under the product name as it does on Justin's site and when I clicked on the product image or name, I got a "Forbidden Access" error message rather than returning to the product page. I verified that this happened on my backup copy without the Edit Cart mod so obviously I had done something in a previous mod or it was a result of upgrading from 1.37 to 1.38a.
    Does anyone have an idea where I should look for the problem?

 

 
Page 2 of 17 FirstFirst 123412 ... LastLast

Similar Threads

  1. v151 Add multiple products with attributes to cart with single click
    By mark777 in forum General Questions
    Replies: 1
    Last Post: 16 May 2013, 08:33 AM
  2. Products with Attributes - Instant Add to Cart with PopUp?
    By ksoup in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 20 Jun 2009, 05:52 PM
  3. Add to Cart Not Appearing with Products with Attributes. Please help me!?!?
    By alegria in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 26 Jun 2008, 11:46 PM
  4. Replies: 2
    Last Post: 3 May 2008, 10:42 AM
  5. Shopping Cart contents editing failed
    By debtag in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 25 Feb 2008, 02:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR