Zen Cart Logo

Shipping Problem

Views: 3,831

Results 21 to 40 of 44
15 Dec 2011, 6:03 PM
#21
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Shipping Problem

No, if a flammable product is in the cart then I want to be able to turn off table1.php

I assume now your going to tell me that the code would need to be entered into table 2.php?

15 Dec 2011, 6:08 PM
#22
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Problem

No, if you want to turn off table1.php for flammable products, and you set those master_categories_id to the flammable products master_categories_id then you want to add that code to the table1.php code just below the code similar to:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
    }
15 Dec 2011, 6:10 PM
#23
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

ok, I think you probably mean the other way round though don't you?

table1.php Non Flammable

table2.php Flammable

So I want to turn off table1.php when a flammable product is in the cart.

15 Dec 2011, 6:20 PM
#24
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Sorry just re-read what you put. That would be correct then. :D

Thank Linda

15 Dec 2011, 6:21 PM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Problem

Sure thing ... let us know how this works for you ... :smile:

15 Dec 2011, 11:20 PM
#26
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Hi Linda this works perfectly, I just need to apply it to the live shop now and then we're sorted so thank you very much for your help.

You deserve a beer :-) :clap:

15 Dec 2011, 11:29 PM
#27
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Problem

Thanks for the update that this does work for you ... good luck with your shop! :smile:

16 Dec 2011, 3:43 PM
#28
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Hi Linda, I need your help again :-)

I have another problem now which is slightly related. I have just found out that all the categories on http://www.jakwater.co.uk will be Royal Mail Track and Trace apart from 'Chemicals' which will need splitting into two categories

Chemicals > First Class

Chemicals > Royal Mail Track and Trace

So applying your code is much easier apart from we need to display all the sub category products in the top level Chemicals category, not Chemicals > First Class and Chemicals Royal Mail Track and Trace

I decided that probably the easiest way of doing this would be to adapt the Products New Center Box and make it look like the product listing, then display that above the First Class (non flammable) and Track and Trace Categories (flammable).

However you can't display a buy now and product description by default.

I found your code to display a buy now on specials so wondered if this could be adapted? OR could the products be made so no matter if theres a sub category they all display in the top level category?

This was the code from your post about displaying a buy now button on specials.

http://www.zen-cart.com/forum/showthread.php?t=115495&highlight=Buy+button+Specials

$products_link = '';
if (zen_has_product_attributes($specials_index->fields['products_id'])) {
$products_link = '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($specials_index->fields['master_categories_id']))) . '&products_id=' . $specials_index->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
$products_link = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials_index->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
}

$specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price . '<br>' . $products_link);
16 Dec 2011, 8:55 PM
#29
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Problem

The best way to do the change is to look at the two files for the centerboxes in something like Beyond Compare from scootersoftware.com to see how they are very similar but differ from one another so that you can adapt that code to the new_products.php module ...

19 Dec 2011, 2:32 PM
#30
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Ok Linda, I didn't use beyond compare as it won't work on a mac and thats what I'm using.

Din't need anything like it. I've managed to update the new products center box listing code to include a quantity, description and add to cart button. The last thing I need to do is remove the random function from new_products.php

I've tried on line 50 replacing

if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);

with

if ($new_products_query != '') $new_products = $db->Execute($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);

But that stops the full display of products altogether and displays a single new product.

Ideally I would like them to display in alphabetical order if I can.

19 Dec 2011, 2:53 PM
#31
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

I've also got another problem now in that there will be around 100 products in one of the categories. This means that I will need to have next/prev links somehow.

19 Dec 2011, 3:28 PM
#32
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

I don't think using the new products center box will work because I cannot have next/prev links on it.

So how would I list all sub category products in a top level category?

19 Dec 2011, 4:25 PM
#33
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping Problem

The Prev/Next is not designed for use on the Centerboxes ...

What is it you really want?

Do you need a New Product Centerbox with a buy now button?

Do you need a New Product Centerbox that shows ALL of the New Products?

If you want all of the features New Products page, can't you use the New Products page?

I am afraid that I am lost on what it is you are trying to do now ... :blink:

Type really really slow ...

19 Dec 2011, 4:31 PM
#34
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Hi Linda, thanks for the reply.

I thought the products new center box would be sufficient to handle showing all products from sub categories in a top level category. That has now been totally destroyed as a solution as the person I'm doing the site for has now told me there could be a 100 products in the chemicals category.

What I really need is a way to list all the products from sub categories displayed in a top level category while keeping the category tree intact because of the postage issue which we resolved earlier in this post.

The problem is that I don't want customers to see the sub categories on the site and I need all sub category products listed in a single category.

19 Dec 2011, 6:04 PM
#35
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Linda what about Plan B.

Would it be possible to create a switch in the admin that selected which postage should be used?

19 Dec 2011, 6:15 PM
#36
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

I've just been told that product_extra_fields will do the job so how would I go about this?

19 Dec 2011, 8:34 PM
#37
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Linda I've just found your post here about a multiple products duplication tool.

http://www.zen-cart.com/forum/showthread.php?t=180447&page=1

Did you get this fully developed?

If this works then I can duplicate each product to the top level category which strictly I'm aware you shouldn't do as Zen Cart hasn't been built to handle products and categories within the same category. However it seems to work so if you can let me know that would be great.

Thanks

Nick

19 Dec 2011, 9:10 PM
#38
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shipping Problem

If you duplicated the products to the top category, they would all officially be in the same master category and your subcats would be pointless. I didn't want to mention the practice of linking the products into their top cat unless it was determined that there was no better way. That does have the possibility of search or pricing issues, and especially if it's for someone else, I don't think it's a good idea to risk it.

It would have saved time in discussion in your other thread if you had mentioned that you already had extensive work on the shipping issue in the forum.
A straightforward method of handling this if only one category is involved is to make two top categories for flammable and non-flammable chemicals. You don't have to name them so blatantly, but with over 100 products, a breakdown into two distinguishable groups might even be beneficial. Is there anything that users would readily see as differences in kind between flammables and non? Why would it be bad for customers to see the chemicals in two categories? I can imagine that they would want to know that certain chemicals required special handling.

19 Dec 2011, 9:15 PM
#39
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Shipping Problem

Hi Linda I've finally managed to get to the bottom of this and have a workable solution thanks to your mass duplication tool. It works great by the way so hope you plan to develop further.

http://www.zen-cart.com/forum/showthread.php?t=180447&page=1

I firstly downloaded and installed your tool.

Then I moved my first class and track and trace categories to a category which is switched off called Chemicals Admin Category. First Class and Track and Trace are switched on inside this category as are all the products listed inside them. Then all products listed inside my Chemicals Admin Category have been duplicated to another category called Chemicals (the category where the products should all display). This means that all the products inside my First Class and Track and Trace categories are now mixed in the same category but when I put them through the cart it selects the correct postage method for the product in the cart. This is because my shipping/table1.php (first class) has code in it telling the cart to switch off first class if a Track and Trace item is added to the cart.

Its maybe not the best of fixes but its a workable solution and thats all that matters.

It would be good to have some way of selecting postage/shipping methods from the products description admin in a future release of zen cart as I'm sure there are other people that come across this issue particularly when they are selling chemicals, some of which require a shipping method with insurance. In my situation the insurance is within the shipping price so thats what made it ultra difficult. Otherwise I could probably have used the Optional Shipping Insurance Mod found here http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=348

Anyway thanks for sticking with me on this thread, at least I have a solution that works and thanks for all your help.

19 Dec 2011, 9:20 PM
#40
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Shipping Problem

The plan of hiding the "admin" top category and linking the subcats' products into another top cat neatly avoids the potential issues with the first suggestion. As long as your client can continue to link any new chemical products correctly, it sounds like it should work fine.