Simpla cms related products on the product page
Related Products
$self_ids = array();
$self_products = array();
foreach($this->products->get_self_products($product->id) as $p)
by {
$self_ids[] = $p->related_id
$self_products[$p->related_id] = null;
The
/* sku_related_products */
if( $product->variant->sku ){
foreach($this->variants->get_sku_product_id($product->variant->sku, $product->id) as $ps)
by {
$self_ids[] = $ps
$self_products[$ps] = null
The
Unification of the Massive
$self_ids = array_unique ($self_ids)
The
/*/ sku_related_products */
if(!empty($self_ids )
by {
foreach($this->products->get_products(array('id'=>$self_ids, 'in_stock'=>1, 'visible'=>1)) as $p)
$self_products[$p->id] = $p;
$self_products_images = $this->products->get_images(array('product_id'=>array_keys($self_products)));
Foreach($self_products_images as $self_product_image)
if(isset($self_products[$self_product_image->product_id]))
$self_products[$self_product_image->product_id]->images[] = $self_product_image;
$self_products_variants = $this->variants->get_variants(array('product_id'=>array_keys($self_products), 'in_stock'=>1));
Foreach($self_products_variants as $self_product_variant)
by {
if(isset($self_products[$self_product_variant->product_id]))
by {
$self_products[$self_product_variant->product_id]->variants[] = $self_product_variant;
The
The
Foreach($self_products as $id=>$s)
by {
if(is_object($s )
by {
$s->image = &$s->images[0];
$s->variant = &$s->variants[0];
The
Other
by {
unset ($self_products [$id] )
The
The
$this->design->assign('self_products', $self_products);
The
The code is displayed on the color product page
Screenshots attached
It is necessary to make it out on the product page under each product.
Screenshot attached
Applications 2
Client's review of cooperation with Ivan P.
Simpla cms related products on the product pageEverything at the highest level! Fast and Quality
Freelancer's review of cooperation with Aleksandr Kurd
Simpla cms related products on the product pageA clear task! timely answer to the question to clarify in the course of the work. I recommend for cooperation.
Current freelance projects in the category Web Programming
Make edits on the WP site.
89 USD
It is necessary to make edits on a website that is on WordPress. The site is related to casinos, so experience with this topic is welcome. The list of edits that need to be made: - Move 15 blocks from ACF to Gutenberg Block + check its display - Set up the correct display of… Web Programming ∙ 3 minutes back ∙ 9 proposals |
Refinement of WordPress site (Elementor + WooCommerce) for Google Ads advertising launchWHAT NEEDS TO BE DONE The work is divided into blocks; you can take on everything or individual blocks: Block 1 — Speed Optimization (Mobile-First) The current PageSpeed score for the mobile version is 51/100. It needs to be raised to 80+. Target metrics: LCP < 2.5 s… Content Management Systems, Web Programming ∙ 14 minutes back ∙ 13 proposals |
Development of a modern SEO website for a coffee food truck
1000 USD
Looking for an experienced developer to create a modern website for a mobile coffee shop in the USA, taking SEO requirements into account. The current website already exists, but a new site needs to be developed from scratch, focused on long-term promotion in Google. What is… Web Programming ∙ 9 hours 56 minutes back ∙ 98 proposals |
Create a Chrome plugin for connecting to a proxyCreate a Chrome plugin for connecting to a proxy I am looking for a developer, possibly with AI who has successfully published similar plugins in the store just AI writing without development experience is not needed please send proposals regarding price and deadlines AI & Machine Learning, Web Programming ∙ 1 day 2 hours back ∙ 29 proposals |
Tik Tok Live node.je
16 USD
It is necessary to write a mini program based on the TT-live-connector library, so that when launched, it reads the Gifts being sent and displays a smooth and beautiful animation through a regular web page. Web Programming ∙ 1 day 16 hours back ∙ 29 proposals |