Zen Cart Logo
Forums / All Other Contributions/Addons / Editing cart contents -- esp products with attributes

Editing cart contents -- esp products with attributes

Views: 24,165

Results 121 to 140 of 166
5 Mar 2009, 11:42 PM
#121
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Editing cart contents -- esp products with attributes

HI Dasha

What is the URL of your site, and which SEO mod are you using?
There has been talk about this problem, but I have never really had a good look at it.

6 Mar 2009, 2:56 PM
#122
dasha avatar

dasha

New Zenner

Join Date:
Mar 2008
Location:
Nashville, TN
Posts:
21
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Hey Justin -
Thanks for looking into this for me. The website is http://www.planet3press.com

We are using Simple SEO URL with the latest version of edit cart.
Thanks for your help!

Dasha:smile:

6 Mar 2009, 4:43 PM
#123
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Hi Dasha

I had a look at your site (very nice, wow.) I tried selecting a product(Brochures - 8.5 x 14)and setting some attributes. Added it to my cart and then was able to edit it fine.

Do you have Simple SEO installed right now?

6 Mar 2009, 5:06 PM
#124
dasha avatar

dasha

New Zenner

Join Date:
Mar 2008
Location:
Nashville, TN
Posts:
21
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Justin-

Thanks for the compliment on the site :)
Sorry i should have clarified. Our site is live so I had to disable the product pages from being in the SEO Optimised URL's because of this issue... sorry that doesn't offer much help. :(

let me know if you need anything else from me. I'm trying to install it on our test server so I can play around with it with the SEO issue.

Dasha

8 Mar 2009, 2:00 PM
#125
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Hi Dasha

I had a wee look at it, and the news is not good.

It appears that Simple SEO when it tidies up and reformats the URLs. tosses away the information about the previously chosen attributes when it makes the links.

I played around with it. When you put an item in your cart with attributes chosen and then click on the product link in the shopping cart, you are taken to the product info page with all the defaults selected. The attributes you chose are not selected. This means that using such a link with edit cart is meaningless, since the customer would have to reset all their attribute values from scratch again.

The unaltered zencart, shows the options the user selected when they return to the product page from the product link in the shopping cart.

If you tinker with it, I think you will see what I mean. To fix this up you would need to change the way Simple SEO works. Probably not trivial.

If I am wrong please let me know.

Justin

8 Mar 2009, 2:32 PM
#126
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Actually, I just went off and did something else (put down the futons) and then I realized there is a way.

If you alter the link used in the tpl_shopping_cart_default.php template file so that it doesn't go through the Simple SEO mod, then it will work. That will probably mean hacking the /includes/modules/pages/shopping_cart/header_php.php file, though it might be possible to duplicate the default link making function for product info pages into your template file.

If you follow what I am saying then maybe you can make those changes yourself. If not, I can probably do it for you. But we would probably need to have a discussion via PM about it.

Justin

9 Mar 2009, 4:15 PM
#127
flipside avatar

flipside

Zen Follower

Join Date:
Oct 2004
Location:
Ontario
Posts:
114
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

How do we create a link (programmically) that does not get processed by the SSU module? Is there a special call to zen_href_link we can make?

9 Mar 2009, 4:26 PM
#128
dasha avatar

dasha

New Zenner

Join Date:
Mar 2008
Location:
Nashville, TN
Posts:
21
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Justin - Flipside (who just responded before me) is working with us on this issue. Thanks so much for all your help!!

Dasha

10 Mar 2009, 2:21 AM
#129
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

SSU takes over the zen_href_link functionality, so you will either need to:
i) find out where SSU does that, and add a hook of some sort, that calls from the shopping cart can make use of to avoid being SSU'd.

or

ii) create a copy of the original zen_href_link function or logic, call it say zen_href_link_nossu, and call that instead from the shopping cart.

They would be the approaches I would look at. To me ii) looks better because you would be able to update SSU in the future without breaking your code. And it might be easier, thout\g without getting into it is hard to say.

Good luck.

10 Mar 2009, 3:26 PM
#130
flipside avatar

flipside

Zen Follower

Join Date:
Oct 2004
Location:
Ontario
Posts:
114
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Nope... that doesn't solve the issue.

10 Mar 2009, 11:38 PM
#131
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Um, what doesn't solve what issue?

What did you do?

And after you did it, did the url to the product info page from the shopping cart look like a standard url or like an Simple SEO mod url?
Or did it change the url correctly but not change the behaviour on the product info page?

Justin

30 Jul 2009, 7:49 PM
#132
mkopecky avatar

mkopecky

New Zenner

Join Date:
Aug 2007
Posts:
31
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

justinhunt:

Actually, I just went off and did something else (put down the futons) and then I realized there is a way.

If you alter the link used in the tpl_shopping_cart_default.php template file so that it doesn't go through the Simple SEO mod, then it will work. That will probably mean hacking the /includes/modules/pages/shopping_cart/header_php.php file, though it might be possible to duplicate the default link making function for product info pages into your template file.

If you follow what I am saying then maybe you can make those changes yourself. If not, I can probably do it for you. But we would probably need to have a discussion via PM about it.

Justin

Hi Justin,
Great mod. The edit cart is exactly what we are looking for. I installed it and it works great as long as I have our Ultimate SEO mod turned off. If I turn Ultimate SEO on I receive a page not found when I attempt to edit a product's attributes. As mentioned above, it looks like there were some users who had an issue with the Simple SEO mod. Do you know if there is a fix? I wasn't sure what was meant by the above comment regarding hacking the header.php file. any advice on how to use Ultimate SEO along with edit cart would be great.
Thanks,
M

1 Aug 2009, 12:07 AM
#133
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Hi mkopecky

The thing is that there is really no problem with edit cart. The problem is with the way the SEO mods, make their urls.

On our kuroobiya site, here is a link to the product page for a karate uniform:
http://kuroobiya.com/shop/index.php?main_page=product_info&cPath=17&products_id=48

Now if we set some attributes and head off to the shopping cart page, the link to return to the product info page looks like this:
http://kuroobiya.com/shop/index.php?main_page=product_info&products_id=48:1280d3c6e6a54821721c580eb95c0d1b

The trailing string at the end, on the second link, contains the information about the attributes that were selected. This is all standard zencart, there are no modifications here.

So if you want to modify the attributes you selected you click on the link in the shopping cart and head back to the product info page. Editcart doesn't change this either. Only once you get to the productinfo page, Editcart looks for the trailing string and turns the page into an Edit page (as opposed to an add page).

BUT the SEO mods remove the trailing string, so it is not there.
You can see this even without editcart. In standard zen cart the attributes previously selected , say size, color, will be selected on the return to the product info page from clicking on the shopping cart link. ( But in standard zen cart of course there is no edit button, only an add button on that page). However if you use an SEO mod none of the pre selected attributes will be selected in the product info page on the return there. That information just gets thrown away.

The solution I proposed earlier was to change the tpl_shopping_cart_default.php template file so that the links generated there do not go through the SEO mod, but are produced like standard zen cart links. This would work, but you need to do some coding.

I honestly do not have time to just do that from the goodness of my heart, I moved on long ago, and am working on other things now that take up most of my time. But I know that some people need this functionality. So if someone who can code, can get in there and do it, I would be grateful.

Otherwise if I am to do it, well I will just have to put out my hand and say PM me.

I hope that I have explained the problem ok. If it is still unclear, please let me know. Good luck

Justin

3 Aug 2009, 3:23 PM
#134
mkopecky avatar

mkopecky

New Zenner

Join Date:
Aug 2007
Posts:
31
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Hi Justin,
Thanks for the reply and the additional information. I knew it would involve some coding, but wasn't sure what. I'll send you a pm.
Thanks
mkopecky

31 Jan 2010, 8:57 PM
#135
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

This is a great mod that has been broken by using an SEO mod like many others have experienced.
I am using Ceon URI Mapping and don't know if the following fix will work for any other SEO mods but it seems to work for me :)

In tpl_product_info_display.php, change:

//add Justin Edit_Cart Mod 20080224
if(is_numeric($_GET['products_id'])) {
$cartAction="add_product";
}else{
$cartAction = "edit_product_in_cart";
}

to:

//add Justin Edit_Cart Mod 20080224
if($_SERVER['QUERY_STRING'][0] == ':') {
$_GET['products_id'] = $_GET['products_id'] . $_SERVER['QUERY_STRING'];
}

if(is_numeric($_GET['products_id'])) {
$cartAction="add_product";
}else{
$cartAction = "edit_product_in_cart";
}

The bit in red is what you need to add.
All it does is rebuild the products_id value that should be passed through to the product info page but gets stripped out by the SEO mod.

Let me know if anybody spots a problem with this fix please!

31 Jan 2010, 9:38 PM
#136
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

Oh, and if anybody like the 'click to edit' text but only wants it to appear if the item has attributes, change the following line in tpl_shopping_cart_default.php from:

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<br />[click to edit]' . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>

to:

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle">

<?php echo $product['productsName']; if(!empty($product['attributes'])) { echo '<br />[click to edit]'; } echo '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
31 Jan 2010, 11:49 PM
#137
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

Hi Damian,

Thanks so much for those changes, it's really great. I am a bit slow off the mark with zencart with these days, but I will add those changes to the editcart mod asap.

Justin

1 Feb 2010, 6:56 PM
#138
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

No problem Justin; I'm happy to give something back!
It's normally me asking for help :D

20 Feb 2010, 10:30 PM
#139
justinhunt avatar

justinhunt

New Zenner

Join Date:
Sep 2007
Posts:
77
Plugin Contributions:
1

Re: Editing cart contents -- esp products with attributes

I updated the edit cart mod about 2 weeks ago, but it took a while to be approved by the zen cart team.

This change is basically to add support for Ceon URI mapping (thanks Damian), and a tidy up of the documentation.

Edit Cart is now known to support two SEO mods:
Ceon URI mapping and Ultimate SEO

Justin

1 Mar 2010, 6:44 PM
#140
dvdtitan avatar

dvdtitan

New Zenner

Join Date:
Apr 2007
Posts:
87
Plugin Contributions:
0

Re: Editing cart contents -- esp products with attributes

I have installed it and like this mod however just a slight problem that i can see in terms of user functionality.

On my site i sell outdoor apparel and if someone buys a jacket in a size / colour combo and goes to the cart then decided they want another one they will click on their chosen product and go back to the product info page. However they can only edit the 1 item in their cart and not add further variations of this product to their purchase.

My issue is what if they want to order another size / colour combo of the same product as a second item?

i.e. they buy jacket a in black small, how do they then buy jacket a in navy medium?