Jump to content
Zappo

[Contribution] Linked Products

Recommended Posts

sorry to double post, but I fixed the problem in the admin side, and (of course) it was of my own doing...knocked out a (.) for a comma when pasting the offer variable...

however I do have another 1054 when I go to edit/create a product...

1054 - Unknown column 'type_linked' in 'field list'

select type_linked from product_types where type_id = '0'

Edited by coolfly

Share this post


Link to post
Share on other sites

Hello Zappo and people

 

I've just discovered this contribution, I didn't installed yet, and there are some questions I have. I need to say that I've option types v2 contribution (including the ajax attributes manager in the v2 package) installed.

 

Comparing the files, I can see that big parts are similar (some files identical) to the option types v2 contribution The questions/remarks:

 

1) Linked Products do not contain the latest small upgrades in the option types v2 (see here), even they are included in the latest option types upgrade. Thats easy for everyone to do, just to point it out

 

2) Linked products contain the removal of the "regular" product attributes section. Since there is still an issue with this (see here), I guess that this is not recommended to do right now?

 

3) There are various small changes by the linked products code in the parts of code that have been already altered by the option types v2 code (into the BOF-EOF parts), and even in the new option types files (like option_types.php) Is it safe just to replace that code?

 

And more general questions:

 

4) Since I have the product listing contribution installed, that rewrites the includes/modules/product_listing.php file completely, is it possible to install linked products leaving the product listing part out (missing the contributions options, ok), or leaving the merging for "later"? I guess yes

 

5) Since the plain display of other (related - linked) products on the product info page is already done (for me) having an other contribution, I'm mainly interested in the option this contribution here offers to display "products as options". Are there any thoughts to have this feature as a separate addon available in the future?

 

(the part to integrate this all into sts is an other fairy tale :)

 

A nice Sunday to everybody :)

Share this post


Link to post
Share on other sites

Zappo could answer those questions best, but after just spending a day and half trying to get past the errors I mentioned above, I would strongly consider waiting for him to revisit this thread before installing this.

I can tell you two things,

-I'm pretty sure the errors I had were all related to one problem with the product_types table in the db (fields: type_id, type_color, and type_name)..I tried circumventing them by manually adding the values with phpmyadmin, but the error remained, so I think something's not connecting the dots there. Was getting another undefined column (line 484) error in the 'linked types' part of the store admin, again with those 3 fields...the other options all had drop downs that seemed to work fine. Wish I had the experience to fix them, but not yet.

-His new product attributes page looks awesome..very nicely laid out with the different 'option types' available..hope he comes back soon and finishes it.

 

I found something called 'related products' that I'm trying to install now..seems to be similar to this and master products, recently updated and actually has an involved support thread. It would be great to see this one get off the ground though, as it has all the contributions you need, already built in.

Share this post


Link to post
Share on other sites

Sorry everyone for not following this thread, but Linked Products had so much troubles, I started rewriting a lot of code, and it's all quite a mess right now...

I'll have to find the time to re-engage this contribution, and for the time being I have to advise against using this contribution in a Live installation...


Like Eek said... It never hurts to help!
----------------------------------------

Share this post


Link to post
Share on other sites

Sorry everyone for not following this thread, but Linked Products had so much troubles, I started rewriting a lot of code, and it's all quite a mess right now...

I'll have to find the time to re-engage this contribution, and for the time being I have to advise against using this contribution in a Live installation...

 

nooooooooooo. you should have included this notice on the contribution. i've updated so much.


JClay

Share this post


Link to post
Share on other sites

This looks like a really useful contribution and its a shame that its no longer being developed! Being able to encourage customers to add accessories will massively help us meet our margin on more competitively priced products.

 

There seem to be several contributions that offer a similar functionality but none would work as neatly as Linked Products could if it was completed. Most other contributions I've seen work by suggesting similar products, which have to be added to the basket separately. The beauty of this is that all products checked in product_info.php are added to the cart in one go. If the price was dynamically adjusted, we'd be looking at one really neat contrib.

 

I'd like to realise some of the functionality that Linked Products offers and would consider writing my own contrib to do something similar. I don't want to re-invent the wheel, so Zappo if you have any plans to rejuvenate this then let me know!

 

Tim. :thumbsup:

Share this post


Link to post
Share on other sites

After going through all the add ons and trying MS products and family product etc,I found that Linked Products is what I was looking for.

BUT getting some problems in functionality. I can not figure out how to add product typs so I can have one main product and few selectable optional product for main product.

 

Screenshots are different then actual fields in admin area.(in product types page). so I am trying all combinations but no luck yet.

 

It looks like Zappo is not intrested anymore.I hope someone else can show me how to get main product with selectable optional products.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi guys!
I have osCommerce OM v2.2, PHP4, MSQL4.
I started installing the Linked Products v1.1.0 module and also got errors.
See the screenshot.

Line 484 has an error in the admin / product_types.php file. See screenshot 2.
Line 484 has eval ($ RowVal ['input']);

How can this be remedied?

Thank you in advance!

Product-Types.png

Product-Types-error-484.png

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

The module also uses functions that are not in osCommerce.
get_type_options
get_linked_listing
get_current_listing
get_type_id

I think that this module could never function on OSC 2.2 ..

// BOF - Zappo - Linked Products - Product Types - ONE LINE - Get all Products Type Options
    $TypeOptions = get_type_options($product_info['type_id']);
// BOF - Zappo - Linked Products - Show/Hide Options - Show Linked Product's Options (when viewing 2nd Product Listing)
    // - Zappo - Replace products_id with selected Linked Product's product_id (for searching Attributes)
    $LinkOpt_ProdID =  $HTTP_GET_VARS['products_id'];
    $LinkOpt_ID =  '';
    if ($TypeOptions['type_linked_options'] == 'Linked' && isset($HTTP_GET_VARS['LpID']) && tep_has_product_attributes($HTTP_GET_VARS['LpID'])) {
      $LinkOpt_ProdID =  $HTTP_GET_VARS['LpID'];
      $LinkOpt_ID =  '_' . $HTTP_GET_VARS['LpID']; // Use this to find the correct Options for this product in application_top
    }
// BOF - Zappo - Linked Products - Find current category (And if it's showing products)
    $TreeArr = get_linked_listing($product_info['products_id']);
    if (!empty($HTTP_GET_VARS['LcPath'])) {
      $LcPathArr = (explode('_',$HTTP_GET_VARS['LcPath'])) ? explode('_',$HTTP_GET_VARS['LcPath']) : array($HTTP_GET_VARS['LcPath']);
      $CurrCatid = $LcPathArr[count($LcPathArr)-1];
    } else {
      if (count($TreeArr) > 1) {       // If CatTreeArray has multiple categories (or products) - Set as Current
        $CurrCatid = 'top';
        $LcPathArr[0] = 'top';
      } else {
        foreach ($TreeArr as $CatParent => $Cat) {
          $LcPathArr[] = $CatParent;
          $cC = 0;
          while(is_array($Cat[$cC]) && count($Cat[$cC]) == 1) { // - Zappo - While the current Category has no multiple items...
            foreach ($Cat[$cC] as $CatParent[$cC+1] => $Cat[$cC+1]) {
              if (!is_array($Cat[$cC+1]) && count($CatParent[$cC] == 1)) { // Only one item found?
                $LcPathArr[] = $CatParent[$cC];
                $CatParent = $CatParent[$cC];
              } else {
                $LcPathArr[] = $CatParent[$cC+1];
                $CatParent = $CatParent[$cC+1];
              }
              $cC++;
            }
          }
        }  // Checked the Array --> We've found multiple items and set the parentCats to the $LcPathArr
        $CurrCatid = $CatParent;  // Set found category as Current
      }
    }
    $CurrentArray = get_current_listing($TreeArr,$LcPathArr, $CurrCatid);
    if (is_array($CurrentArray)) {  // Check if $CurrentArray was gathered correctly --> Else drop the whole thing...
      foreach ($CurrentArray as $ItemID => $ItemVal) {
        $cat_depth = (!is_array($ItemVal) || $cat_depth == 'products') ? 'products' : 'categories';
      }
    }
// EOF - Zappo - Linked Products - Find current category (And if it's showing products)
    // - Zappo - Added Check for Options, and to hide them if They are currently not needed (Linked Listing and stuff)
    $HideOptions = (empty($LinkOpt_ID) && $CurrentArray && $cat_depth == 'categories') ? 'Yep' : (($cat_depth == 'products' || !empty($LinkOpt_ID)) ? 'Nope' : 'Yep');
	
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$LinkOpt_ProdID . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);

 

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites
7 hours ago, frankl said:

:blink:

Yes, I have an old store.
PHP4 quickly runs on Windows Server 2012.
Other PHP5 + have significant problems for Windows.

If I install a new store, it's definitely not Oscommerce.
Oscommerce. has already died 7-8 years ago.
And it's sad ...


No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

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

×