Jump to content

Adding Weight to 'Hidden' category ?


Nik Grey

Recommended Posts

As some will know I have an unusual situation.

 

I need to be able to sell Mugs AND Vinyl lettering (and other products once I have worked this all out) - I can use the 'Per category' Shipping Method but that way if somebody buy's 2x Mugs they are charged 2x £4 which is unfair. (I can charge for a Lettering product though - good for me)

 

With 'Shipping By Weight' it is much fairer on the Mug side of things BUT I cant find a way of charging for the vinyl lettering as there is no where for me to add a weight for this product (as the products themselves are generated as they are purchased - they appear one by one if you see what I mean due to the nature of the way my 'Lettering Tool' was created).

 

If, somehow I could add a default weight to any 'Lettering' product I could work this in a way that's fair to both myself and the customer - any ideas?

 

I hope I have made myself clear..

Link to comment
Share on other sites

I'm hoping it can, can't see how to set that though.

 

I cant go into 'Products' and set the weight as I can with a Mug as these 'Lettering' products don't exist - and they won't until somebody buys one and by then it will be too late :(

 

Not sure if you have been following my situation, it's not as straight forward as I would have hoped - the developer who made my tool went about it in an 'unorthodox' way :(

Link to comment
Share on other sites

Is the weight variable? That is, if one product is 2-meter long, and another is 1-meter long, will they have different weights? (I would think so.)

 

So, having the CC_inventory table, weight column default to something like 2.5 (kilograms) won't be the solution.

 

The most appropriate solution would be to add code for an equation for product area multiplied by weight per unit area, and that's the total weight.

 

As an aside: in following your Lettering Tool adventure, I have not read where you say the project's code is human-readable or not. If it is, great.

Link to comment
Share on other sites

I don't mind having a standard weight for any 'Lettering' product as it will still cost me a minimum to send it !

 

So if I can add a default weight for those the that would be great - I will look at that right now.

 

The code is not encrypted, it IS readable fortunately.

 

 

 

 

 

... ah, but there is no 'Lettering' in the inventory - so no where to add a weight from what I can see :(

 

Yes, I see exactly what you mean now - cant do that..

Link to comment
Share on other sites

I don't understand what you mean by "no 'Lettering' in the inventory".

 

How much would a typical lettering order weigh?

 

Using phpMyAdmin, edit the table structure of CubeCart_inventory. You will want to change the default value of 'product_weight' from null to a typical weight of a lettering order (just the value as Cubecart keeps track of weight by lb or kg elsewhere).

Link to comment
Share on other sites

I don't understand what you mean by "no 'Lettering' in the inventory".

 

 

 

Unless I am missing something, or looking on the wrong place (entirely possible).

 

In the CC_inventory I have all of the products listed - so-far they are my Mugs, and an application tool (Squeegee) which have weights associated with them (0.4 and 0.2kg).

 

There are no 'Lettering' products listed, here's an image.

 

so surely if I add a default weight in the Structure it would affect the other products ?

 

oh, by the way - I managed to get my activation key for FlashFXP :)

Link to comment
Share on other sites

There are no 'Lettering' products listed in CubeCart_inventory.

 

Did you remove them all?

 

 

So surely if I add a default weight in the Structure it would affect the other products?

 

No, it will not affect table records that already exist. Only new records. You would need to be unconscious of that and make sure you enter a weight when adding new, legitimate inventory items.

Link to comment
Share on other sites

Yes, I did remove them all - we found rogue 'Lettering' products under category numbers that no longer existed and I removed all of them via admin.

 

I see what you mean now..doh.. Set the default weight to 'X' and anything that I don't change the weight for will be this default - so the 'Lettering' products would all be set to this default weight value.. ah.

 

Will get onto this now - this could be the answer :)

Link to comment
Share on other sites

While you have the Add Product screen open, CubeCart has not queried the database. The Add screen shows a blank form. The Product Weight field should be empty.

 

Then, when you click Save, CubeCart takes the data from the form and gives that data to an INSERT statement. If the Product Weight form entry field is blank, the browser does not send that form element's name or value back to CubeCart, and CubeCart will not try to save any value for the 'product_weight' column.

 

MySQL, now not having received a value for this column, will use the default value of 0.400.

 

Later, when you Edit this product, the form is filled in with all the data that is contained in the database record -- including the 0.400 in the 'product_weight' column that MySQL added for you.

 

If you had entered a value for Product Weight when adding the product, CubeCart would have included that value when INSERTing the form data.

 

Again, having been given a blank form to fill out when adding a new product, CubeCart does not query the inventory table first to pre-populate form fields.

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
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...