Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Adding An Item To Bulk Editing Of Products Rate Topic   - - - - -

 
  • simonv74
  • Member
  • Members
  • Join Date: 27-Aug 08
  • 84 posts

Posted 25 March 2014 - 11:37 AM #1

Hi,

I have a store which uses a data feed run daily by CRON which updates the drop ship products in the store.

As some prices provided are not ideal we have coded this into the update.tpl file:

<div class="form-field cm-no-hide-input">
  <label for="keep_price_unchanged">{$lang.keep_price_unchanged}:</label>
<input type="hidden" name="product_data[keep_price]" value="N" />
<input type="checkbox" name="product_data[keep_price]" id="product_keep_price" value="Y" {if $product_data.keep_price == "Y"}checked="checked"{/if} class="checkbox" />
</div>

However, as there are sometimes many prices to 'freeze' we need to be able to add this function to the bulk editing screen.

Cart version is: 3.0.6

Can anyone advise the necessary TPL files to edit to realise this? Thank you

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19766 posts

Posted 25 March 2014 - 01:12 PM #2

@simonv74,

Please open the "controllers/admin/products.php" file and find arrays with the "$selected_fields" and "$field_groups" names. You should extend them.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • simonv74
  • Member
  • Members
  • Join Date: 27-Aug 08
  • 84 posts

Posted 25 March 2014 - 01:54 PM #3

@simonv74,

Please open the "controllers/admin/products.php" file and find arrays with the "$selected_fields" and "$field_groups" names. You should extend them.


@eComLabs - thank you very much for your suggestion.

I added:

array(
   'name' => '[data][keep_price]',
   'text' => fn_get_lang_var('keep_price_unchanged')
  ),

To "$selected_fields", and:

'C' => array ( // checkboxes
   'is_edp' => 'products_data',
   'edp_shipping' => 'products_data',
   'free_shipping' => 'products_data',
   'feature_comparison' => 'products_data',
   [b]'keep_price_unchanged' => 'products_data'[/b]
  ),


To "$field_groups".

This solved it.

Thanks again

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19766 posts

Posted 25 March 2014 - 02:05 PM #4

@simonv74,

You are welcome! I have checked the code and it should work correctly if you put it to the "C" array. Please try to clear the templates cache at first.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • simonv74
  • Member
  • Members
  • Join Date: 27-Aug 08
  • 84 posts

Posted 25 March 2014 - 02:13 PM #5

@simonv74,

You are welcome! I have checked the code and it should work correctly if you put it to the "C" array. Please try to clear the templates cache at first.


Yes, it worked perfectly, thank you once again, you saved me hours!