Jump to content

Combinations - single stock


Recommended Posts

Hi All,

 

I had a search around this forum but could not find a definitive answer. I also put a ticket in with Presto Changeo about their modules but was told they don't have one that suits.

 

The shop setup - daily i import a CSV of all our products with stock levels and prices etc into the shop to keep it in sync with a central system.

 

I have a pretty simple requirement - I need to add an optional "Fitting charge" to some of the products (keyed manually is fine). I can achieve this using combinations.. ie i have a "supply only" price and a "supply and fit" price. But each has its own quantity and it ignores the quantity on my CSV import. Yet clearly both combinations are for the same physical item, one just comes with a fitting charge (car parts basically).

 

Is there a workaround to Prestashop to make it take its combinations quantities from the main product quantity?

 

Many thanks in advance

 

Below is how it looks for example

 

rtp82bO.png

  • Like 1
Link to comment
Share on other sites

My suggestion would be to use the customization fields of products. 

 

If you add a customization text field it will be a free text field and it will appear in the tabs of your product page, but both those issues can be solved with some modifications in your product.tpl file.

 

post-302430-0-08116300-1469100346_thumb.jpg

Edited by musicmaster (see edit history)
Link to comment
Share on other sites

Thanks for the reply, I had a try of that but yes it just adds a text field for the customer - it does not allow cost to be added to the product. What i'm looking to have is the option of buying product only, or product with included fitting (which carries an extra cost).

 

So with combinations I can have an impact on the price but obviously it breaks the stock levels.

 

You mention i could modify the product.tpl file - would this be to get the system to pull the main product quantity rather than the combination quantity? If so, are there any references to what code i could change?

Link to comment
Share on other sites

Sure, you cannot set prices. I don't have a solution for that.

 

As for the modifications. I don't know any cookbook article, but it isn't that difficult. 

You should modify the file product.tpl of your theme. Inside the file you should find the text "customization" and replace the code for the input field with a selectbox with certain product id's.

 

On my theme the relevant code that should be replaced looks as follows:

{if $product->text_fields|intval}
<div class="customizableProductsText">
	<h3>{l s='Text'}</h3>
	<ul id="text_fields">
	{counter start=0 assign='customizationField'}
	{foreach from=$customizationFields item='field' name='customizationFields'}
		{if $field.type == 1}
		<li class="customizationUploadLine{if $field.required} required{/if}">
			<label for ="textField{$customizationField}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}</label>
			<textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>
		</li>
		{counter}
		{/if}
	{/foreach}
    </ul>
</div>
{/if}

The syntax of the templates of Smarty. Smarty has extensive documentation on the internet.

Link to comment
Share on other sites

  • 10 months later...

Hi marcusnye,

 

Did you find a way to have only one stock for different product combinations?

I also need something like this, in my case, warranties.

 

I need to add several different warranties to products by categories, and the easiest way I found was with combinations. But warranties are not "physical" products, and combinations don't share the same stock, so I have the same issue as you.

 

I saw this module made by Presto Changeo

 

http://www.presto-changeo.com/en/prestashop-attribute-modules/98-prestashop-single-stock-attributes-module.html

 

but reading your comment made me doubt if it would suit my needs. I will ask for more details about the module.

 

I'm running on PS 1.6.1. What PS version are you using? 

  • Like 1
Link to comment
Share on other sites

The module you linked to seems to be perfect for what you want to do. Presto Changeo makes excellent modules and has the best customer service so I can recommend them without hesitation --  use a half-dozen of their modules on my stores.

Link to comment
Share on other sites

  • 1 year later...

It would be an excellent module if there'd be a simple option inside the quantities page of each product where you could actually set if the product should have qtys for all combinations or not. And this for every product! THAT would be excellent. This module just doesn't improve the quantity system, it just switches from the standard bad implementation to the other bad possibility of managing quantities. So you could call it useful but surely not excellent.

 

Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...