Is there a way to get the products name to show in the downloadable tableSBAdata ? If there is ,can somebody tell me how to do it please ?
Is there a way to get the products name to show in the downloadable tableSBAdata ? If there is ,can somebody tell me how to do it please ?
Referring to the export option that is available from the configuration->Stock By Attributes menu?
I haven't looked at that section of code recently to verify everything works as expected and what it would take to add that column on to the export and not affect the reverse import... I believe that the column is included in a similar function of EasyPopulate v4 more intended to manage stock of existing variants, but I thought product name was included...
Anyways if someone else doesn't get back to you with the how to add product name to the export, I'll take a look.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Thanks for replying. Yes , that's what I'm referring to. I've found it more reliable than EP4 for accurately updating attribute quantities , just that it's tedious to be looking for each products model no.
Sorry to focus on the specific terminology here, but based on the conversation it seems to me that the "reliability and accuracy" part of the issue is on the operator not the software. Until just now, no one has commented requesting any other sort method for the export/importof SBA quantities in EP4. While the issue of adding the name to the import/export file of SBA remains to be resolved for this case, there is now an item to address in EP4.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
My question is about the custom id. Using zen cart 1.5.4 and stock by attribute 1.5.4. The custom id shows on invoice , email , order history . If I search for a product in the search boxes available , category/product search ,
stock by attribute/ search , the product id ,product name , and product model , will all locate the product.
Is there a way to have the admin search use the SBA customid to find a product ? Thanks.
Haven't tred/developed yet, but around lines 2s0 and 2f0 of admin/includes/modules/category_product_listing.php there appears to be a comparison of entered search content against various fields in the database... This is where it seems that the customid for SBA could be factored in.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I think at least admin/includes/modules/product/collect_info and admin/includes/modules/product/preview_info will also have to be changed, and probably some other files as well -by somebody who understands php,mysql,and the zencart relational database -which somebody is not me. If I want to go any further with this I will have to pay to get some custom coding done , I reckon , thanks.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I was looking at this and copying it's structure
https://www.zen-cart.com/downloads.php?do=file&id=442.
It's an example of a new product identifier being successfully installed and made available to search.
When I did this in admin/includes/modules/category_product_listing
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c, "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and p.products_id = pas.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . " %'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_id = '%" . zen_db_input($_GET['search']) . "%'
or p.products_upc = '%" . zen_db_input($_GET['search']) . "%'
or pas.customid = '%" . zen_db_input($_GET['search']) . "%'
or p.products_model = '%" . zen_db_input($_GET['search']) . " % ')" .
$order_by);
} else {
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and pas.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$order_by);
}
although no errors are produced search still won't find the product by it's uniqueid.However I did similar changes to preview_info and collect_info and it still doesn't work, so I'm missing a relationship somewhere .
Not in front of a computer, but unless every product in your store is also tracked by attributes, my guess is the product not stocked by attributes is no longer locateable by search.
For one thing the SBA table needs to be left joined on the query. But then if a search is performed on a sba tracked item on a field not in the sba table for a product tracked by sba, then one row for each variant of the product will be returned. Pair this with the second query returns the customid (when not doing a search) and if it does so for some purpose of display then would want to do the same thing in the search query.
My thought though and I still need to run the query through a database test, would be to either apply distinct to the first (search) query, left join the sba table on products_id, apply a like instead of = on the search, and remove pas.customid from the second query, but duplicate the above to it as well...
Otherwise, might add an additional query ahead of these two such that the sba table is searched, when it has a positve result of a product_id, then feed that into the search queryresult as one of the where comparisons.
Just a thought...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Bookmarks