Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[SSPP] Separate Shipping Per Product----Support Forum


rpdesign

Recommended Posts

Ok does your admin look similar to the pic bellow? If not this is your problem!

 

 

 

This is the separate shipping box and this is where you apply different rates per products/ category. the per category is a known bug where you have to apply the rates to the sub categories it doesn't work on the main categorys the solution is in troubleshooting.txt file

 

This module uses a combination of BOTH the one that you have been using and the separate shipping box you see in the pic!

 

If you notice the screenshot is of the live site.

 

I think I should make a video of the configuration parts 2 and three in order to explain everything a little better B)

 

Ok i have recreated your problem! now to find out what is going on.

 

Ok so the file as is should work remember when I said I tried to break my module, Well I forgot to re-edit it and was testing with only the all setting in mind

 

Yes my admin looks exactly like that. You're on the edge of a really monumental contribution. Even the best modules' support threads be over 100 pages deep. So I believe this is the beginning of something huge. And the best part of about it you're providing support.

 

I will do the edits in your last poat to see what happens

Link to comment
Share on other sites

ok again with my session timing out. I have recreated the problem with paypal express and hopefully have fixed it!

 

just add

//SSPP Begin
class objectInfo {
// added from admin
function objectInfo($object_array) {
 reset($object_array);
 while (list($key, $value) = each($object_array)) {
 $this->$key = tep_db_prepare_input($value);
 }
}
}
//SSPP End

 

after

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

 

in your catalog/ext/modules/payment/paypal/express.php file

 

I will update the installation instructions to include this step! Thank you

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

weird the forum said i don't have permittion to edit my own post hmmm...

 

Anyhow, line 17 in catalog/includes/modules/shipping/shipping.php should read

$page = htmlentities($_SERVER['PHP_SELF']);

That file structure doesn't exist in version 2.3.3

And line 30 should read

if ( $page == DIR_WS_HTTP_CATALOG . FILENAME_CHECKOUT_SHIPPING ){

 

This will correct the problem :thumbsup:

 

I've made that correct in separate.php already.

 

Thanks.

Link to comment
Share on other sites

I must have been typing at the same time you were, please look at my last post for the express.php file edits. You were right all along :- :rolleyes: !

$page = htmlentities($_SERVER['PHP_SELF']);

That file structure doesn't exist in version 2.3.3

 

well no, this is custom programing for separate.php what this line does is call up the current page your on in your server if this code was placed on index.php it would echo or return a value for $page as /index.php

 

and you have to include the class objectInfo to the paypal express module so the shipping quote will be correct (w00t)

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

ok again with my session timing out. I have recreated the problem with paypal express and hopefully have fixed it!

 

just add

//SSPP Begin
class objectInfo {
// added from admin
function objectInfo($object_array) {
 reset($object_array);
 while (list($key, $value) = each($object_array)) {
 $this->$key = tep_db_prepare_input($value);
 }
}
}
//SSPP End

 

after

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT);

 

in your catalog/ext/modules/payment/paypal/express.php file

 

I will update the installation instructions to include this step! Thank you

 

I believe you done it!!!!!! It worked like a charm.

Link to comment
Share on other sites

Damn If only I listened to you earlier (w00t) Ok so now that we have this sorted out I need to add the instruction and update the install video.

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

@

 

It looks like it's working well. I don't mean to impose a challenge on you so early in the game but here it is. A lot of people that use oscommerce sell hundreds maybe thousands of products. We use a program named Easy Populate. This program allows us to populate our shops with several items at once by way of a spreadsheet. It would be super if you could get your contribution to work with Easy Populate so a shop owner can populate several products at once with their shipping prices already attached to the products.

 

Just a thought. Thanks

Link to comment
Share on other sites

I am familiar with Easy Populate and would love to modify it so that it could easily import several rates. However the developers have made a huge file in it and maybe they'll work with me on pointing me in the right direction for a module. I already know that they have support for Separate Pricing Per Customer with a module. So i'll take a look into it! In the meantime if you look in the extras folder of the installation you will find sample csv files and in the troubleshooting.txt file I show a way to inport several rates!

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

I am familiar with Easy Populate and would love to modify it so that it could easily import several rates. However the developers have made a huge file in it and maybe they'll work with me on pointing me in the right direction for a module. I already know that they have support for Separate Pricing Per Customer with a module. So i'll take a look into it! In the meantime if you look in the extras folder of the installation you will find sample csv files and in the troubleshooting.txt file I show a way to inport several rates!

 

Would you by any chance know how to display the shipping rates on the product page? I was thinking something like:

<?php echo ($product_info['p_rate']); ?>

or similar.

 

I looked at the csv files. Will I be able to amend that p_rate column to a CSV file that I import into my shop? Easy populate may not recognize that column.

 

Thanks

Edited by discxpress
Link to comment
Share on other sites

The csv files are to be manualy uploaded within phpMyadmin's import tab. The instructions are within the troubleshooting.txt file. And to answer your question, no you can't use Easy Populate yet as it only populates the categories and products tables and nothing else. The reason that Separate Pricing Per Customer works within Easy Populate is that it edits those two exact tables and the categories.php file in admin.

 

 

Would you by any chance know how to display the shipping rates on the product page? I was thinking something like:

<?php echo ($product_info['p_rate']); ?>

or similar.

 

This is a great idea for a future addon that is not specific to one shipping module! ;)

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Your CSV idea is what make your contribution great. The only thing is if I have 2500 or more products and I download an SSPP file to make some edits to shipping costs to a few products. How will I know which products I'm editing without a Product ID, a product title or product model?

 

Thanks

Edited by discxpress
Link to comment
Share on other sites

Just export your product table in phpadmin If you read the troubleshooting.txt file it will read like so

 

ISSUE: I have several products/categories, Is there a way to import several shipping rates at once?

 

Yes and no. Yes in that it can be done, but it takes awhile to gather the info. But there is a somewhat easy way to do it.

Go to phpMyadmin or your local database administration tool select products or categories table

For each table click on export tab select csv as your file type

check Put columns names in the first row

click go

now save to a location on your computer.

Now get rid of all columns except product_id, products_name, products_model for the products table and categories_id, categories_name for the categories table. This will give you an idea of the ids you need for your rates.

 

Now do the same for the tables shipping rates and shipping table rates except DO NOT DELETE ANY FIELD! Now edit all your rates into these tables.

 

I've included sample csv files in the extras folder under Sample csv files, look at rows one and two in each for an example of how to configure the files. The first is a sample product rate row the second is a categories rate row. In the shipping_tables_rates.csv file i've included 4 rows the first two are for a sample product the second two are for a sample category. Use the ids you got from the above steps for your p_id and c_id values p_id is for products id and c_id is for categories id. Make sure that you have either a p_id OR a c_id NOT BOTH for your rates. The easiest way is to make a file with actual rates set up in the table from entering it in the separate rate box [in admin] and then exporting the table you want [in phpMyadmin]. *** note you can leave the rate_id fields alone. ***

 

If you are making a flat rate for your product use the shipping_rates.csv file and please place the product id in the p_id field, your flat rate in the p_rate field, if you want to use the flat rate vs table rate place a 1 for p_status otherwise place a 0[zero], if you want to use free rate place 1 in p_free otherwise place a 0[zero] and 0 [zero] for the c_id,c_rate,c_status,and c_free fields.

 

For each Table rate you want to apply to your products please use the shipping_table_rates.csv file and place the products_id in the p_id field, the qty/weight/or price value in the p_qty field, the shipping rate in the p_tbl field. Place 0 in the c_id,c_qty,and c_tbl fields. ****** The p_ind or c_ind fields are for a future update and are not used at this time please put in 0 [zero] for these fields *although putting in a 1 won't do a thing* *********

 

Do the opposite of the above steps for your categories rates.

 

Now after everything, whew ;), click on the inport tab of your phpMyadmin area making sure you have shipping rates or shipping table rates table selected. Select the csv file you just made and inport with Replace table data with file checked. There now it is done!

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Hopefully, this is what you were looking for. But it was in front of you all this time :lol: Just needed to read my reply's when I told you to look at the troubleshooting.txt file :-

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

I did read the files but needed a little more understanding. My coding and dealing with databases is very amateur. Judging by your detailed description, the products table will export product ids out in the same order as the shipping rates table and all I have to do is match my proposed shipping rates to the product ids while keeping my 2 exports separate. Then once I get my shipping rates set I just import the CSV file back into the shipping rates table.

 

I hope I understand what you were saying. Thanks again.

Edited by discxpress
Link to comment
Share on other sites

Ok I'll try to make an actual video of what i'm trying to explain. No, the export will Just give you an idea of what your product ids will be for the entrys into the shipping rate.csv file's p_id fields. But I guess that is an approximate representation of how it will work. When phpMyadmin exports the products table it will export every field in your table including products_id's etc... But it doesn't export in the same order as the shipping rate table so when you look at the exported csv file of your products table you can see what product_id has been assigned to your individual product products_name is no pun intended the products name so follow this back to the products_id field to get the p_id value for your rate in the shipping_rate.csv file.

 

Ok re-reading your post yes that is what I was getting at (w00t)

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Update!!! I will be working on a way to use a similar Easy Populate function for this module and others! The new Easy Populate function will allow you to export any table into a csv file not just the categories or products table

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Ok I'll try to make an actual video of what i'm trying to explain. No, the export will Just give you an idea of what your product ids will be for the entrys into the shipping rate.csv file's p_id fields. But I guess that is an approximate representation of how it will work. When phpMyadmin exports the products table it will export every field in your table including products_id's etc... But it doesn't export in the same order as the shipping rate table so when you look at the exported csv file of your products table you can see what product_id has been assigned to your individual product products_name is no pun intended the products name so follow this back to the products_id field to get the p_id value for your rate in the shipping_rate.csv file.

 

Ok re-reading your post yes that is what I was getting at (w00t)

 

Great!!!! I looked again at the CSV file I exported from shipping_rates table and I see that it indeed goes by products_id. So now I can assign shipping rates to the products by their ids and voila!

 

And the news about easy populate is great also. Looking forward to it. Make sure you when you get the Easy Populate program to work with your creation, upload it to the addons section as a separate package don't allow outside files to be uploaded. I've seen several great programs get slaughtered like that. LOL

 

Much appreciation for your support!

Link to comment
Share on other sites

Update!!! when creating the video for SSPP configuration part 2 I noticed a bug with the product table rates in the Separate Shipping boxes. I will have the fix and update for you in a moment!

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Update!!! bugfix 1.45 uploaded. The above bug has been fixed!

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Here it is Boys and Girls the configuration part2 of my SSPP!

 

 

 

Edited by burt
Removed Donation Link.

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

It would be great when I figure how to pull p_rate from the shipping_rates table and display it on product pages. I know it's maybe a few lines of code but I don't know where to start.

 

This is a matter of building a query for what you want. And it also involves building a query from several; tables at once with the inner join and select distinct comands for mysql. I would suuggest playing with querys in phpAdmin untill you get what you want. When you get this far you will have to call up the results in the products pages. If you figure it out I'll include it in the package.

 

Or it might be as simple as calling up the shipping quotes in the products pages.... hmmm

 

Oh by the way please look at the second of three config videos and happy 4th of july

Edited by rpetet

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

  • 2 weeks later...

Sorry I been busy putting the finishing touches on my website. The more I get to understanding your contribution the easier it gets. Shipping costs will be one of the final configurations I'll make.

 

I've been thinking.... You think maybe you could add an additional cost feature later. For example, Item A shipping is $2.99 then add items B, C, D and so on for $1.50 each

Link to comment
Share on other sites

You could set a table rate for the 1st product at 2.99 and then the second table rate up to 10000 products at 1.50 :thumbsup: so your table rates would look like 1 2.99 10000 1.5

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Just be aware of a slight bug in this addon that requires you to have an entry in the flat rate for table rates to work :- I will be working on a solution to this as we speak

Always backup your files! You will be glad you did

My add-ons :

SSPP Seperate Shipping Per Product v2.5| Support
Gift vouchers for SPPC 4.22 v2.1 | Support |
Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |
HTML Mail v2.0 | Support |




Upcoming Add ons:

Addon Manager |
Separate Pricing Per Product Qty |
Coupon Populate |
EZ-PDF Catalog

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...