Page 9 of 17 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 166
  1. #81

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

    Hi Pasmith,

    There's a better way to suppress your quantities box without setting it to 1 so that it has this negative effect on this mod.

    I don't know what it is offhand, but I know I've seen it here on the form.

    I would go to the section of the form for customizing and set up and search for 'hide quantities box" or "turn off quantity box" or something of that nature.

    I'm confident you'll be able to find the answer to that particular issue. And perhaps it will solve this one for you.
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  2. #82

    help question Help With Edit Cart Mod

    Hi everyone,

    My edit cart button isn't showing. When I click the link to go back and edit the cart, I see the "add to cart" button.

    Now...the functionality works like it should, it's just that the wrong button is displayed. And what's really cool is that it accepts negative numbers...so let's say I have a quantity of five and want to change it to 0. I simply put in -4.

    Since the button ADDS to the cart, that's the only way to do it unless I want to empty the cart and go back and add to it again.

    Problem is, this will be confusing for visitors/customers.

    So, I'd really like for my "update cart" button to show.

    Here's the code from the file located here:
    /includes/templates/MY_TEMPLATE/templates/tpl_product_info_display.php


    //add Justin Edit_Cart Mod 20080224
    if(is_numeric($_GET['products_id'])) {
    $cartAction="add_product";
    }else{
    $cartAction = "edit_product_in_cart";
    }
    echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=' . $cartAction), 'post', 'enctype="multipart/form-data"') . "\n";
    Suggestions?

    I know Justin has a full time job plus his internet business, so he's pretty busy and doesn't get here that often. Can anyone else chime in?
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

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

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

    Hey ScriptJunkie

    Sorry I got here a bit late, Ah, I had a wee squiz at your site. ( I am guessing it is empowermentsanctuary.com)

    The edit cart mod won't work if are not using attributes. The line that you quoted:
    Code:
    if(is_numeric($_GET['products_id'])) {
    $cartAction="add_product";
    }else{
    $cartAction = "edit_product_in_cart";
    }
    is in fact the heart of the matter. If you are using attributes those attributes will be passed in as a hash in the products_id and it won't be numeric. If you are not using attributes, the products_id will always be numeric. Try adding some attributes to one of your test products (eg size : small, medium , large) and see if it works then.

    Good luck

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

  4. #84
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

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

    Hi Pasmith

    Sorry to be a bit slow, I hope you solved it, but if not ...

    I can't be sure what is wrong with your setup, but your guess that it is to do with the max quantity would be my guess too.

    The mod first adds the edited product as a new product, so that you have two items in your cart. Provided there was no error in doing so, it then deletes the original item. Leaving you with just one product.

    If however the new product could not be added, but no error was thrown, then the old product would be deleted leaving nothing in the cart.

    Have you tried removing the max product quantity restriction? If you do this and it works, you could just leave it like that. But if that is not satisfactory, I would change
    Code:
    if ((zen_get_products_quantity_order_max($_POST['products_id']) == 1 and $_SESSION['cart']->in_cart_mixed($_POST['products_id']) == 1)) {
    to

    Code:
    if ((zen_get_products_quantity_order_max($_POST['products_id']) == 1 and $_SESSION['cart']->in_cart_mixed($_POST['products_id']) == 2)) {
    or if you are feeling particularly bold

    change it to
    Code:
    if (false) {
    since this code was copied from the standard add_to_cart action, but is only called when editing a product, so in actual fact is redundant.

    There may be other places that you need to change. If this is all above your head, I can have a look at it for you, but please try it out for yourself first.

    Good luck

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

  5. #85
    Join Date
    Aug 2008
    Posts
    9
    Plugin Contributions
    0

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

    Hiya Justin,

    Thanks for the reply! I got it sorted out, first by doing the "if false" but then I realized I wasn't understand the max items stuff in ZenCart properly. So I got rid of the max quantity limitation and reverted to an un-edited version of your script, and everything is looking good.

    Thanks!

  6. #86
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

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

    OK that is good news. I hope from now you can get on and make some money then ,..
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  7. #87

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

    Hi Justin,

    Thank you for the reply, I know how busy you are and your time is greatly appreciated!

    Yes, my site is empowermentsanctuary.com, but my store is located at empowermentsanctuary.com/marketplace.

    Thanks for the tip on the attributes. None of the test products I've put in so far have any, hence the problem! I will be setting up attributes once I load the cart with actual products.

    It seems I was just putting the cart before the horse in this case :)

    Thanks again for the reassurance. If I have any issues or questions once I tweak a test product, I'll stop back by.
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  8. #88
    Join Date
    Oct 2008
    Location
    Midwest USA
    Posts
    71
    Plugin Contributions
    0

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

    Hi Guys,

    I tried this mod and have a problem that no one else has mentioned yet...

    I added the [click to edit] code (and noticed that Justin's mod shows this as a div, v1.3.8a seems to have changed this to a span) and when I click on this when an item has attributes it seems to work, it shows a button that says "edit cart contents" but I could have sworn Justin's site said "Update Cart" which makes a lot more sense since I don't want to edit the cart contents at this point, I want to update the product and send that back to the cart...

    Anyhow, I digress... when I change an attribute's value and click the edit cart button it dumps me to a blank page... If I hit the back button and return to my shopping cart everything is as it was before attempting to edit the attribute.

    Does any one have any ideas?

    Also, I noticed that the readme says: "Edit your existing includes/templates/TEMPLATE_NAME/templates/tpl_product_info_display.php file, to match the one included in the Product_Info_Display folder."

    But v1.3.8a uses "YOUR_TEMPLATE" and not "TEMPLATE_NAME" but when I looked into the mods dir structure the was no reference to a dir named "TEMPLATE_NAME", It seems that the files are instead dumped into the "classic" folder. I tried to place those files in my template dir after getting the above error but it made no noticeable difference.

    I have turned this mod off as this is a live cart, Any help would be greatly appreciated.

    Gary777

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

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

    Blank pages are caused by PHP errors, often a result of bad uploads or incorrect edits to files.
    See the debug logging utility mentioned in this FAQ on the topic of blank pages: https://www.zen-cart.com/tutorials/index.php?article=82
    .

    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.

  10. #90
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

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

    Hi Gary

    Sorry about the problems.

    As Dr Byte mentions, blank pages are pretty hard to figure out if it is not your code, and you generally have to get a bit technical. But to me it sounds like your install has not gone well.

    There may be differences between my original version and the patched version that Elkay put up, but that is probably not the cause of your problem.

    I suggest you make sure that all the files from the mod you downloaded are present and in the right locations in your shop. If that is OK, then go back through each step of the read me and make sure you have followed the instructions to the letter.

    If there is still no joy, completely remove the mod and start again.

    Justin
    PS I know it is a pain in the ########, but really you should have a copy of your zencart that you try things out on. It can be a local copy on your PC or just another install of Zencart on your webhost, that is not accessible to the general public. When you have tested out your mod or your changes , and they are working, then you upload them from there. Once your site has gone live, and you have customers, down time costs money.
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

 

 
Page 9 of 17 FirstFirst ... 7891011 ... 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