Forums / All Other Contributions/Addons / Quick order page custom addon

Quick order page custom addon

Started by treece on 5 May 2011, 6:03 PM · Views: 2,200

Results 1 to 12 of 12
5 May 2011, 6:03 PM
#1
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Quick order page custom addon

I had a custom module built but my programmer has stopped communicating and I'm stuck without help. I paid in advance.

For the life of me, I can't figure out how to edit this form. There is a blank where a color should be.

http://pre-wrap.com/index.php?main_page=quick_order

I found this form: class.athletic_tape.php which seems to call the product ids for the table, but when I edit it, the color still doesn't show up. This form appears twice - in the includes->templates->my_template folder and in the includes->classes->observers folder

class athleticTape extends base
{
function athleticTape()
{
global $zco_notifier;
$zco_notifier->attach($this, array('NOTIFY_HEADER_START_PRODUCT_INFO'));
}

function update(&$class, $eventID, $paramsArray) {
$products_id = (int)$_GET['products_id'];
$products_id_array = array(30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42);
if (in_array($products_id, $products_id_array)) {
  // redirect to quick order page
  zen_redirect(zen_href_link(FILENAME_QUICK_ORDER, '', 'NONSSL'));
}    
}

}

30, 31, 32, etc. are the product ids for the athletic tape. I figured if I changed or added 43, which is the missing color's id to the list it should work...but no luck.

Any help would be greatly appreciated.

5 May 2011, 6:20 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

The missing color has a product id of 38. (I can see that in the page code when I View Source in the browser.) Is there such a product id in your products?

When you view source in that page you see that down there in that color table there are a whole lot of zenids hanging about in commented code. You must get rid of that zenid -- and probably all of the commented code. it's not doing anything anyway.

I use Quick Order in my wholesale store and it does not produce any such commented code, nor does it produce the large chunk of javascript that I see in your page code at the top. That seems to do the totalling of each line and the total at the bottom. Is that what he was hired to do?

Rob

Breakfast: the most important donut of the day.

5 May 2011, 6:23 PM
#3
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Re: Quick order page custom addon

There is no product id of 38 but the one I want there is 43. He was hired to create this page and have quantity discounts associated with the amounts ordered. I did not know this was the Quick Order module.

I thought if I changed the 38 to a 43 I would get the correct product flowing in, but that didn't work.

Thanks for looking at this!

5 May 2011, 6:26 PM
#4
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Re: Quick order page custom addon

I'm wondering if you found the having a separate wholesale site easier than just trying to set up a wholesale area within zen cart. I've been very frustrated trying to get one set up. Perhaps a whole separate site makes sense.

5 May 2011, 6:27 PM
#5
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

Treece:

I found this form: class.athletic_tape.php which seems to call the product ids for the table, but when I edit it, the color still doesn't show up. This form appears twice - in the includes->templates->my_template folder and in the includes->classes->observers folder
That file is not a standard part of the Quick Order mod. The QO mod does not install anything in the classes/observers folder.

Rob

Breakfast: the most important donut of the day.

5 May 2011, 6:31 PM
#6
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

Treece:

I'm wondering if you found the having a separate wholesale site easier than just trying to set up a wholesale area within zen cart. I've been very frustrated trying to get one set up. Perhaps a whole separate site makes sense.
There was one overriding problem that forced me to do that. I have two different wholesale prices -- one for Canadian customers and one for US customers, so I needed to use the dual-pricing mod on the wholesale site. And we sell our products retail as well, so the other site was needed for that. (There was no way I was going to try coding a 3-price mod.) It also helps to have more than one domain name for the same products - domain names are cheap.

Rob

Breakfast: the most important donut of the day.

5 May 2011, 6:41 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

Treece:

There is no product id of 38 but the one I want there is 43. He was hired to create this page and have quantity discounts associated with the amounts ordered. I did not know this was the Quick Order module.
Okay, that explains the javascript. It looks like he started with the QO mod and heavily changed it.

The code is calling for product id 38 in that spot.

The normal QO mod's main file is...
includes/templates/your_template/templates/tpl_quick_order_default.php
Do you have that file there -- or maybe in the template_default folder instead of your custom folder? Maybe renamed like the one you mentioned above?

Rob

Breakfast: the most important donut of the day.

5 May 2011, 6:54 PM
#8
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Re: Quick order page custom addon

I do have that file and one called:

tpl_products_new_default.php

but I don't know what I'm looking for.

5 May 2011, 7:28 PM
#9
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Re: Quick order page custom addon

I did a work-around for now and changed the product id in the tables.
I still need much work to get this going the way I want it, but it's a start.

5 May 2011, 8:00 PM
#10
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

Good. I see it's working now.

I hesitate to ask, but what else is not working? (If it's not a QO issue, just tell me where the other threads are.)

Rob

Breakfast: the most important donut of the day.

5 May 2011, 8:28 PM
#11
treece avatar

treece

New Zenner

Join Date:
Aug 2008
Posts:
47
Plugin Contributions:
0

Re: Quick order page custom addon

I need to add one more color. It seems logical enough to add another product ID to the string, but I will hold off for now until this works.

The correctly discounted price is not carrying over when I add to cart.

To see what I mean, add 32 of one color, and one more of another. The discount shows properly, and the items add to the cart properly, but the discounted price doesn't come over.

5 May 2011, 11:35 PM
#12
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Quick order page custom addon

I would imagine, since your programmer didn't finish, that the cart is still behaving normally, which means it's being passed the product ids and showing them with their normal prices. Unless there was some serious coding done to change that behaviour, that is normal. I've never set up discounts, so I don't know ZC's capabilities in that regard, but if the ability to do quantity discounts isn't built-in, there's most assuredly a mod for that. Have a look at Free Software Add Ons (link, top-left) and search for "Quantity Discounts".

The trick then will be to get your QO form working with the discounts you want, and then setting up the same discounts on the cart so that when the items are added to the cart from the QO form they end up being priced the same.

Rob

Breakfast: the most important donut of the day.