Jump to content



Latest News: (loading..)

- - - - -

Products Fields Groups


  • Please log in to reply
59 replies to this topic

#41   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 10 April 2012 - 08:15 AM

great to hear

#42   ja1nsa

ja1nsa
  • Members
  • 24 posts
  • Real Name:John Ashcroft

Posted 10 April 2012 - 08:42 AM

Jules

Thanks for the reply. I am still non the wiser, however I have come across a rather interesting scenario. If you download the sample template from monster templates (the one for OScommerce), it now comes the a whole host of additional options including NIVO slider (configurable) and a pile of extra configuration stuff. I beleive it would be well worth OScommerce integraing this and making it 2.3.2 as an upgrade. I don't see where we could hit problems in terms of licensing as it was in a free download. It is also easily changed. Please pass onto the powers that be, maybe nobody has seen these improvements as they are either too advanced and focusing on dev OR too new and not sure what they mean. Really, the additional admin is just great!

Anyway, still not figured out my product setup yet, if you have time to assist I bascially have this scenario. Category (brand e.g. Samsung, Nokia), Product (Phone e.g. Galaxy S2). Now when a customer selects the phone I need to give opions i.e. the package. This could be Talk 100, 200, 500 on Network X, Chat 200,300,800 on Network Y. So ideally I would have 2 drop down boxes. One would allow customer to select Network (5 options), other would allow customer to select Tariff (say 20 options). The tariff would ideally be based on what is selected in the network drop down, though I can live with just 1 long list if needs.

Cheers.
J.

Edited by ja1nsa, 10 April 2012 - 08:43 AM.


#43   ja1nsa

ja1nsa
  • Members
  • 24 posts
  • Real Name:John Ashcroft

Posted 10 April 2012 - 08:50 AM

Please see below screen shots taken from demo template. The screen shows the Nivo Slider. It is embedded in the OS 2.3.1 code and configuable. Works 100%.

Please pass on...

Attached Files


Edited by ja1nsa, 10 April 2012 - 08:51 AM.


#44   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 10 April 2012 - 09:29 AM

Hi ja1nsa

im not 100% sure what u are asking - but it looks like you need some modifications to the options part - whcih my addon does not do - it simply makes use of the options as a means to create extra fields.

Assuming you have the backend part working - ie you are able to create/ add extra fields to products then you can show these extra fields in a variety of ways that are included in the contribution - with a little knowlede of php / html the added code within product_info.php could be changed to fit / meet personal needs based on layout.

#45   ja1nsa

ja1nsa
  • Members
  • 24 posts
  • Real Name:John Ashcroft

Posted 10 April 2012 - 10:06 AM

Julian

OK, I will work it out, getting there, just want to put my site live and then fine tune, but guess I'll have to learn some more first :)

Thanks for replying.

#46   cortezwa

cortezwa
  • Members
  • 2 posts
  • Real Name:Wilber

Posted 11 April 2012 - 08:06 PM

Hi Julian,

Great contribution!

Do you have any idea why my pfg will not save to the database?  Clicking the "save groups" button does not update the groups.  I can see the groups in the dropdown menu. I'm guessing I must have missed something in the following code in admin/categories.php:

//start Product Fields groups 1.3
if($products_count > 0 ){
if($HTTP_GET_VARS['action'] !="pfg_change"){
?>

<tr>
<td></td>
<td align="left" style="padding-top:6px;"><? echo tep_draw_button(TEXT_PRODUCTS_FIELDS_GROUPS_CHANGE, 'disk', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=pfg_change', 'NONSSL'))?></td>
<td></td>
<td></td>
</tr>
<?
}else{
?>

<tr>
<td align="right" style="padding-top:6px;"><? echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : ''))) ?></td>
<td align="left" valign="bottom"><? echo tep_draw_button(TEXT_PRODUCTS_FIELDS_GROUPS_SAVE, 'disk', null, 'secondary')?></td>
<td></td>
<td></td>
</tr>

<?
echo "</form>";
}
}

//end Product Fields groups 1.3

$cPath_back = '';
if (sizeof($cPath_array) > 0) {
  for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) {
if (empty($cPath_back)) {
  $cPath_back .= $cPath_array[$i];
} else {
  $cPath_back .= '_' . $cPath_array[$i];
}
  }
}

$cPath_back = (tep_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : '';
//start Product Fields groups 1.3
if($HTTP_GET_VARS['action'] !="pfg_change"){
//end Product Fields groups 1.3
?>
  <tr>
<td colspan="4"><table border="1" width="100%" cellspacing="0" cellpadding="2">
  <tr>
<td class="smallText"><?php echo TEXT_CATEGORIES . '&nbsp;' . $categories_count . '<br />' . TEXT_PRODUCTS . '&nbsp;' . $products_count; ?></td>
<td align="right" class="smallText"><?php if (sizeof($cPath_array) > 0) echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id)); if (!isset($HTTP_GET_VARS['search'])) echo tep_draw_button(IMAGE_NEW_CATEGORY, 'plus', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category')) . tep_draw_button(IMAGE_NEW_PRODUCT, 'plus', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_product')); ?>&nbsp;</td>
  </tr>
</table></td>
  </tr>
<?
//start Product Fields groups 1.3
}
//end Product Fields groups 1.3
?>
</table></td>


Any help is greatly appreciated.

Edited by cortezwa, 11 April 2012 - 08:07 PM.


#47   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 11 April 2012 - 11:19 PM

Hi cortezwa,

nice catch - seems i missed a step from my 1.3 install instruction - namely the opening form tag

I will update the addon tomorrow but for now.

in admin/categories.php

find

 
$categories_count = 0;
	$rows = 0;
	if (isset($HTTP_GET_VARS['search'])) {

insert ABOVE

 
//start Product Fields groups 1.3
if($HTTP_GET_VARS['action'] =="pfg_change"){
 echo tep_draw_form('products_fields_groups_update', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=pfg_update', 'post', 'enctype="multipart/form-data"');
}
//end Product Fields groups 1.3

pls let me know if the batch update now works

Jules

#48   cortezwa

cortezwa
  • Members
  • 2 posts
  • Real Name:Wilber

Posted 12 April 2012 - 05:10 AM

Thank you Julian,

Your solution worked great! I am now able to do a batch update. :)

#49   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 12 April 2012 - 07:56 AM

Hi cortezwa - thnx for the feedback.

Ive updated the addon with this this missing step.

http://addons.oscommerce.com/info/8247

Jules

#50   ilyadgonbad

ilyadgonbad
  • Members
  • 2 posts
  • Real Name:Emin

Posted 20 April 2012 - 01:43 PM

Thanks for share this addon
I installed last verison but i have problem that my first page and product page give me blank page.
Error of page in source web page is:
 <link rel="[url=""]stylesheet[/url]" type="[url=""]text/css[/url]" href="[url=""]<br />
<b>Fatal error</b>:  Call to undefined function tep_catalog_href_link() in <b>/home/sudmand/public_html/includes/template_top.php</b> on line <b>30</b><br />[/url]

includes/template_top.php at line 30 is:
<!--	start Product Fields group tab  -->
			<link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.8.19.custom.css'); ?>">
		<!--	end Product Fields group tab  -->
file "jquery-ui-1.8.19.custom.css" is aviable at same folder.

please help me.

Edited by ilyadgonbad, 20 April 2012 - 01:43 PM.


#51   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 23 April 2012 - 05:42 PM

Hi ilyadgonbad
this addon is written for 2.3.1 - i pressume you're trying it for an older version , one that doesnt have this function.

If that is the only error you have you could try hard coding the complette URL

<!-- start Product Fields group tab -->
<link rel="stylesheet" type="text/css" href="PATH_TO_MY_CSS/ext/jquery/ui/redmond/jquery-ui-1.8.19.custom.css">
<!-- end Product Fields group tab -->

where PATH_TO_MY_CSS is probably  "catalog"  - having never used an older version cannot say if that is the case.

If you do indeed have other errors then i would suggest upgrading your oscommerce.

Jules

Edited by thejudge99, 23 April 2012 - 05:43 PM.


#52   ce7

ce7
  • Members
  • 202 posts
  • Real Name:lyn

Posted 10 August 2012 - 01:38 AM

Hi Julian

I got the error message as below:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select p.products_id, pd.products_name, p' at line 1

select count(*) as total select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price_cost, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id, p.products_fields_group_id , pfgn.products_fields_group_name from products p, products_description pd, products_to_categories p2c , products p LEFT JOIN products_fields_groups_names pfgn on p.products_fields_group_id = pfgn.products_fields_group_id and pfgn.language_id = '1' where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and pd.products_name like '%test 182%'


also when I tried to edit product with product field group, and save it, I can see it at the back end, but it doesn't show one website. I can PM you my web if you need to have a look.

Thanks

Lyn

#53   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 12 August 2012 - 07:57 AM

hi - could you tell me where exactly you get this error

edit: you have 2 selects on the 1st line

try removing the
select count(*) as total

Edited by thejudge99, 12 August 2012 - 08:08 AM.


#54   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 12 August 2012 - 08:19 AM

ok

replace
as total select

with
as total ,

replace
from products p, products_description
with
from  products_description

you also have a p.products_price in there which i assume is part of another addon

the main actual query you will find in 6h
catalog/admin/categories.php


jules

Edited by thejudge99, 12 August 2012 - 08:21 AM.


#55   ce7

ce7
  • Members
  • 202 posts
  • Real Name:lyn

Posted 26 August 2012 - 01:06 PM

Hi Jules,

Sorry for late reply. I was trying to solve problem with product image.

I had tried to modify the admin/categories.php as you suggested and it works great now.

Thank you so much for your help!

regards,

Lyn

(the error happen when I tried to search product in categories/products, after comment out the products p, it works great!)

#56   srirahandcraft

srirahandcraft
  • Members
  • 33 posts
  • Real Name:Gerhard
  • Gender:Male
  • Location:Banglamung, Thailand

Posted 28 September 2012 - 03:28 AM

Hi Jules,

I have a small problem and have not been able to find it.
After adding a new language, the review tab doesn't pick up this language (I already checked in the source view and the language variable for the new language isn't there), this results in jumping back
to the index page when clicking on the review tab.

Other languages are fine and the contribution is running fine too.

I appreciate your help,

Thanks.

Gerhard
Addons installed on my website:

- Addons Installed
- Advanced Special Offer Discounts
- AJAX-Attribute Manager for osc 2.3.1
- Banner box v1.1.1
- Dutch Language Pack
- Extra Pages-info box with admin for OSC2.3
- German Language Pack
- Login Box
- Multi-language Support for Configuration
- Multiple products manager
- Order Editor
- OSC PDF Catalogue 2.1
- PDF-Datasheet
- product Field Groups
- Quickly Update Product Stock
- Unit of weight
- YAG (Yet another Guestbook)

#57   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 28 September 2012 - 11:00 PM

the script is taking the value of IMAGE_BUTTON_REVIEWS found in includes/languages/xxxxxxxx.php which is Reviews in english.php - which creates a link with Reviews as title

<li><a href="xxxxx" title="Reviews">Reviews(4)</a></li>

and the matching div

<div id="Reviews">XXXXXXXXXXXXXXXX</div>

If you check your source the title tag of the link should match the ID of the div. This is what links them together.
Do you have some special character for IMAGE_BUTTON_REVIEWS ? This may or may not effect it - i havent tried that.


What you can do is replace the 2 occurences of IMAGE_BUTTON_REVIEWS with something hardcoded - which would be the same regardless of language

in products_info.php

replace

<li><a href="/product_reviews_pfg.php?Tc=<? echo (int)$groups_tms_count?>&products_id=<? echo (int)$HTTP_GET_VARS['products_id']?>" title="<? echo IMAGE_BUTTON_REVIEWS ;?>" ><? echo IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : '') ;?></a></li>



with

<li><a href="/product_reviews_pfg.php?Tc=<? echo (int)$groups_tms_count?>&products_id=<? echo (int)$HTTP_GET_VARS['products_id']?>" title="reviews" ><? echo IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : '') ;?></a></li>

and replace

<div id="<? echo IMAGE_BUTTON_REVIEWS ;?>"></div>

with

<div id="reviews"></div>

This can only be a mismatch between the 2 tags

Jules

#58   srirahandcraft

srirahandcraft
  • Members
  • 33 posts
  • Real Name:Gerhard
  • Gender:Male
  • Location:Banglamung, Thailand

Posted 29 September 2012 - 08:42 AM

Hi Jules,

Thanks for your quick answer.

The special characters were the problem (Thai language). For the moment I just changed the Thai translation into English.
This is for "review" not a big problem as Thai also use the word "review" literally translated into Thai.

But is it possible to let the script work with these characters?

The reviews themselves show correct, also in Thai.

Thanks,

Gerhard.
Addons installed on my website:

- Addons Installed
- Advanced Special Offer Discounts
- AJAX-Attribute Manager for osc 2.3.1
- Banner box v1.1.1
- Dutch Language Pack
- Extra Pages-info box with admin for OSC2.3
- German Language Pack
- Login Box
- Multi-language Support for Configuration
- Multiple products manager
- Order Editor
- OSC PDF Catalogue 2.1
- PDF-Datasheet
- product Field Groups
- Quickly Update Product Stock
- Unit of weight
- YAG (Yet another Guestbook)

#59   thejudge99

thejudge99
  • Members
  • 116 posts
  • Real Name:Julian

Posted 29 September 2012 - 09:18 AM

Im not exactly sure wether this is a browser issue or a jquery issue - my script generates the needed tab code in the correct format - but jquery handles the actual tabbing .

I wouldnt actually change your Thai equivalent to reviews - this word will still be used  / seen by your customers - i would change only the title tag and the ID tag - by following the above instuctions. This would be transparent to your customers.

Jules

#60   srirahandcraft

srirahandcraft
  • Members
  • 33 posts
  • Real Name:Gerhard
  • Gender:Male
  • Location:Banglamung, Thailand

Posted 29 September 2012 - 12:33 PM

Hi Jules,

Thanks a lot, I hadn't thought about that.
It's working perfect now.

Gerhard
Addons installed on my website:

- Addons Installed
- Advanced Special Offer Discounts
- AJAX-Attribute Manager for osc 2.3.1
- Banner box v1.1.1
- Dutch Language Pack
- Extra Pages-info box with admin for OSC2.3
- German Language Pack
- Login Box
- Multi-language Support for Configuration
- Multiple products manager
- Order Editor
- OSC PDF Catalogue 2.1
- PDF-Datasheet
- product Field Groups
- Quickly Update Product Stock
- Unit of weight
- YAG (Yet another Guestbook)